1. Docs
  2. Pulumi IaC
  3. Get started
  4. AWS
  5. Before you begin

Pulumi & AWS: Before you begin

    Before you get started using Pulumi, let’s run through a few quick steps to ensure your environment is set up correctly.

    Install Pulumi

    $ brew install pulumi/tap/pulumi
    $ curl -fsSL https://get.pulumi.com | sh
    All Windows examples in this tutorial assume you are running in PowerShell.
    > choco install pulumi

    Other installation options are available. When the installation completes, you can test it out by reading the current version:

    $ pulumi version
    v3.136.1
    $ pulumi version
    v3.136.1
    > pulumi version
    v3.136.1

    If this doesn't work, you may need to restart your terminal to ensure the folder containing the pulumi command is on your PATH.

    Next, install the required language runtime, if you have not already.

    Install Language Runtime

    Choose Your Language

    Install Node.js.

    If you're having trouble setting up Node.js up on your machine, see Installing Node.js via Package Manager for alternative installation options.

    Install Python. To reduce potential issues with setting up your Python environment on Windows or macOS, you should install Python through the official Python installer.

    Either pip or poetry is required to install dependencies. If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If Python is installed using your OS package manager, you may have to install pip separately, see Installing pip/setuptools/wheel with Linux Package Managers. For example, on Debian/Ubuntu you must run sudo apt install python3-venv python3-pip. To install poetry follow the installation instructions.

    If you're having trouble setting up Python on your machine, see Python 3 Installation & Setup Guide for detailed installation instructions on various operating systems and distributions.

    Install Go.

    Pulumi requires a supported version of Go— this typically refers to the two most recent major releases. Note that Go calls 1.20, 1.21, etc. major releases, unlike semantic versioning. If you're using Linux, your distribution may not provide an up to date version of the Go compiler. To check what version of Go you have installed, use: go version.

    Install .NET SDK.

    Pulumi will need the dotnet executable in order to build and run your Pulumi .NET application. Ensure that the dotnet executable can be found on your path after installation.

    Install Java 11 or later and Apache Maven 3.6.1 or later.

    Pulumi will need the java, javac, and mvn executables in order to build and run your Pulumi Java application. Ensure that these executables can be found on your path after installation.

    Good news! You don't have to install anything else to write Pulumi programs in YAML.

    Configure Pulumi to access your AWS account

    Pulumi requires cloud credentials to manage and provision resources. You must use an IAM user account that has programmatic access with rights to deploy and manage resources handled through Pulumi.

    If you have previously installed and configured the AWS CLI, Pulumi will respect and use your configuration settings.

    If you don’t have the AWS CLI installed, or you plan on using Pulumi in a CI/CD pipeline, retrieve your access key ID and secret access key and then set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables on your workstation:

    $ export AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>"
    $ export AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>"
    
    > $env:AWS_ACCESS_KEY_ID = "<YOUR_ACCESS_KEY_ID>"
    > $env:AWS_SECRET_ACCESS_KEY = "<YOUR_SECRET_ACCESS_KEY>"
    

    AWS profiles are also supported:

    $ export AWS_PROFILE="<YOUR_PROFILE_NAME>"
    
    > $env:AWS_PROFILE = "<YOUR_PROFILE_NAME>"
    

    For additional information on setting and using AWS credentials, see AWS Setup.

    Manually exporting AWS access keys can be prone to error and a security risk, with frequent plaintext copy-pasting. With Pulumi ESC, you can dynamically retrieve short-lived AWS credentials via OpenID Connect, removing the need for manual exports and enhancing security. Learn more about Pulumi ESC.

    Next, you’ll create a new Pulumi project.

      PulumiUP 2024. Watch On Demand.