How to Setup AWS Credentials using Visual Studio Code

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

AWS- Create Credentials Profile using VS Code
  1. Open VS Code Palette using Keyboard Shortcut: Command + Shift + P if on Mac (Control + Shift + P for Windows)
  2. Now type in: AWS Create Credentials Profile
  3. Now you will be guided with the steps as questions,

    • 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
  4. Once these steps are complete, you should see two files opened on VS Code,

    # 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

    region = us-east-1
    output = json
  5. 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:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap