AWS CLI Basics: A Beginnerβs Tutorial
Install AWS CLI
Download and Install it from the official AWS CLI installation guide.
Run aws configure
$ aws configure
aws configure --profile myprofile
AWS Access Key ID [None]: YOUR_ACCESS_KEY_ID
AWS Secret Access Key [None]: YOUR_SECRET_ACCESS_KEY
Default region name [None]: us-west-2
Default output format [None]: json
Verify Configuration
aws configure list
Configuration Files
AWS configure command stores your credentials
& configuration
settings in two files located in the ~/.aws directory:
~/.aws/credentials: Stores your AWS access key ID and secret access.
key.~/.aws/config: Stores your default region and output format.
Remove Credentials from Configuration File
Manually remove the credentials from the configuration file
Open the
~/.aws/credentials
file (on Unix-based systems) orC:\Users\
USERNAME.aws
\credentials
(on Windows).Delete the
[default] section or any other named profile section
that contains your credentials.
Unset Environment Variables
If you have set your AWS credentials using environment variables, you can unset them:
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
Delete AWS CLI Cache
rm -rf ~/.aws/cli/cache
Feel free to share and spread the knowledge! ππ Enjoy Learning! π
Subscribe to my newsletter
Read articles from KALPESH MOHANTA directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
KALPESH MOHANTA
KALPESH MOHANTA
π Hi there! Welcome to my DevOps adventure! π I'm Kalpesh, a DevOps Engineer, and I'm thrilled to share my journey in the dynamic world of DevOps and Cloud Technologies. π π§ Tech Arsenal: CI/CD Automation: Streamlining workflows for seamless deployments. Containers & Orchestration: Docker & Kubernetes. Cloud Platforms: Azure, AWS. Version Control: Git. Configuration Management: YAML, Linux commands. π My Journey: I've had the privilege to work on diverse projects, including a notable deployment for PepsiCo. My expertise spans CI/CD automation, containerization, cloud services, and scripting to enhance system performance and reliability. π‘ Why Follow Me? Join me as I delve into: Cutting-edge DevOps practices. Automation techniques. Cloud innovations. Tips & tricks for aspiring DevOps professionals. π€ Connect & Collaborate: Let's build, learn, and innovate together. Whether you're a fellow tech enthusiast, a professional looking to share insights, or someone eager to learn, let's connect and grow in this vibrant community. π’ Follow my LinkedIn & Hashnode blog for insights, tutorials, and updates. Together, we'll embrace the ever-evolving DevOps landscape!