Configuring your toolchain - AWS Toolkit for VS Code

Configuring your toolchain

The AWS Toolkit for Visual Studio Code supports multiple languages that you can use to interact with AWS. This topic describes how to set up the toolchain for each of these languages.

Configure a toolchain for .NET Core

  1. Ensure that you have the AWS Toolkit for VS Code installed.

  2. Install the C# extension. This extension enables VS Code to debug .NET Core applications.

  3. Open an AWS Serverless Application Model (AWS SAM) application, or create one.

  4. Open the folder that contains template.yaml.

Configure a toolchain for Node.js

When debugging a TypeScript Lambda fuction directly from the source code (the launch configuration’s ”target“: ”code“), the TypeScript compiler must be installed globally. For more information on installing this, see TypeScript on https://www.npmjs.com/.

  1. Ensure that you have the AWS Toolkit for VS Code installed.

  2. Open an AWS SAM application, or create one.

  3. Open the folder that contains template.yaml.

Configure a toolchain for Python

  1. Ensure that you have the AWS Toolkit for VS Code installed.

  2. Install the Python extension for Visual Studio Code. This extension enables VS Code to debug Python applications.

  3. Open an AWS SAM application, or create one.

  4. Open the folder that contains template.yaml.

  5. Open a terminal at the root of your application, and configure virtualenv by running python -m venv ./.venv.

    Note

    You only need to configure virtualenv once per system.

  6. Activate virtualenv by running one of the following:

    • Bash shell: ./.venv/Scripts/activate

    • PowerShell: ./.venv/Scripts/Activate.ps1

Configure a toolchain for Java

  1. Ensure that you have the AWS Toolkit for VS Code installed.

  2. Install the Java extension and Java 11. This extension enables VS Code to recognize Java functions.

  3. Install the Java debugger extension. This extension enables VS Code to debug Java applications.

  4. Open an AWS SAM application, or create one.

  5. Open the folder that contains template.yaml.

Configure a toolchain for Go

  1. Ensure that you have the AWS Toolkit for VS Code installed.

  2. Go 1.14 or higher is required for debugging Go Lambda functions.

  3. Install the Go extension.

    Note

    Version 0.25.0 or higher is required for debugging Go1.15+ runtimes.

  4. Install Go tools using the command palette:

    1. From the command pallete, choose Go: Install/Update Tools.

    2. From the set of checkboxes, select dlv and gopls.

  5. Open an AWS SAM application, or create one.

  6. Open the folder that contains template.yaml.

Using Your toolchain

Once you have your toolchain set up, you can use it to run or debug the AWS SAM application.