Connecting to AWS through the AWS Toolkit for Visual Studio Code - AWS Toolkit for VS Code

Connecting to AWS through the AWS Toolkit for Visual Studio Code

To interact with Amazon Web Services (AWS) through the AWS Toolkit for Visual Studio Code, you must establish a connection to AWS.

Connect to AWS through the Toolkit for VS Code

  1. Open VS Code.

  2. To open the Command Palette, on the menu bar, choose View, Command Palette. Or use the following shortcut keys:

    • Windows and Linux – Press Ctrl+Shift+P.

    • macOS – Press Shift+Command+P.

  3. Search for AWS and choose AWS: Connect to AWS.

            AWS Toolkit Command palette, Connect to AWS
  4. Choose a profile from the list.

            AWS Toolkit command palette choose profile window

    If you don't have a credentials profile set up, you are prompted to set one up. Look for a pop-up in the lower-right corner of the editor. Choose Yes, and then follow the setup wizard to enter a profile name, your access key ID, and your secret access key. For details, see Setting up your AWS credentials.


    If you want to provide an external credential process instead of using AWS-supported credentials, choose No and see Using an external credential process instead.

            AWS Toolkit setup profile prompt.
  5. Open the AWS: Explorer Side Bar, which we call the AWS Explorer, to verify the connection. You will see either a list of AWS Regions (if you have made any Regions visible in the AWS Explorer) or a message to add Regions to the AWS Explorer.

    Before adding Regions to the AWS Explorer, you see the following.

            AWS Eplorer without Regions

    After adding Regions to the AWS Explorer, you see something like the following.

            AWS Eplorer with regions

Use multiple AWS accounts with the Toolkit

You might have multiple AWS accounts that you want to access from the Toolkit for VS Code. Multiple accounts can be useful, for example, to provide developers and administrators with separate resources for development and for release or publication.

Separate sets of AWS credentials are stored as profiles within the shared AWS config file or the shared AWS credentials file. To choose a different set of credentials, follow the steps in the previous procedure, and choose a different profile.