If you have not setup your AWS Credentials using the AWS CLI and want to set it up using Visual Studio Code, the first thing to make sure is you have AWS Toolkit for VS Code installed,
Tutotial: Installing AWS Toolkit for VS Code
Steps to Setup AWS Credentials using VS Code
- Open VS Code Palette using Keyboard Shortcut: Command + Shift + P if on Mac (Control + Shift + P for Windows)
- Now type in: AWS Create Credentials Profile
- Now you will be guided with the steps as questions,
Example: - Choose a unique name for the new profile (Press 'Enter' to confirm or 'Escape' to cancel): training
- Input the AWS Access Key: AKXXXXXXJRWIAXXXXXU
- Input the AWS Secret Key: kiiOXXXXXAeXoQa1RDZ3XXXXXXXXXXXZRttXXX
- Show the default region "us-east-1" for credentials "profile:training" in AWS Explorer?: Yes
- Once these steps are complete, you should see two files opened on VS Code,
Credentials[training] # This key identifies your AWS account. aws_access_key_id = AKXXXXXXJRWIAXXXXXU # Treat this secret key like a password. Never share it or store it in source # control. If your secret key is ever disclosed, immediately use IAM to delete # the key pair and create a new one. aws_secret_access_key = kiiOXXXXXAeXoQa1RDZ3XXXXXXXXXXXZRttXXX
Config[default] region = us-east-1 output = json
- You are all good to go! You will find the credentials and config file under your User directory inside .aws
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to AWS,
- Get the total size and number of objects of a AWS S3 bucket and folders
- How to Create AWS SNS Topic using AWS CLI
- Fix: Amazon Linux bash: sudo: command not found
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Create an AWS User using CLI2 Command at a specific Path
- Fix: Missing the following required SSO configuration values: sso_start_url, sso_region
- Fix: zsh: command not found: aws (Mac/macOS)
- Configure AWS Access ID and Secret Keys using CLI on Mac
- Quick way to setup AWS DynamoDB locally on macOS
- Most Essencial AWS CLI 2 S3 ls Command Options
- How to Check AWS SNS Permissions using CLI
- AWS CLI Change Default Output Format
- How to install AWS CLI on Ubuntu
- Quick way to install AWS CLI for macOS Terminal
- Install AWS CLI using Brew Command
- AWS CLI Command to Get a List of SNS Topics
- Get List of AWS SNS Topic Subscriptions using CLI
- How to Setup AWS Credentials using Visual Studio Code
- Installing AWS CLI Version 2 on macOS Sonoma using Terminal
- AW3 CLI command to get list of all region names
- AWS SNS CLI Command Publish Message Attributes
- Create an S3 bucket in a specific AWS region using CLI Command
- [Fix] zsh: command not found: awscli [Mac Terminal]
- Understanding AWS Calculator: DynamoDB on-demand capacity
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
More Posts:
- Display Seconds in Digital Clock on Mac Menu Bar [macOS] - MacOS
- Meaning of javascript:void(0) explained with example - JavaScript
- How to change the font in TextEdit on Mac - MacOS
- How to Disable Trackpad on MacBook - MacOS
- How to Enable Remote Management using Mac Terminal - MacOS
- Remove AirDrop Icon from macOS Menu Bar - MacOS
- Microsoft Office Mac Ventura: System Settings must be changed before Microsoft AutoUpdate can run - Microsoft
- Get Word Count in TextEdit - MacOS