Creating an environment - Amazon CodeCatalyst

Creating an environment

Use the following instructions to create an environment that you can later associate with a workflow action.

Before you begin

You need the following:

  • A CodeCatalyst space. For more information, see Set up and sign in to CodeCatalyst.

  • A CodeCatalyst project. For more information, see Creating a project with a blueprint.

  • An AWS account connection that includes the IAM roles your workflow action will need to access AWS. For information about creating an account connection, see Allowing access to AWS resources with connected AWS accounts. You can use a maximum of one account connection per environment.

    Note

    You can create an environment without an account connection; however, you will need to come back and add the connection later.

  • One of the following CodeCatalyst roles:

    • Space administrator

    • Project administrator

    • Contributor

      Note

      If you have the Contributor role, you'll be able to create an environment but you won't be able to associate it with an AWS account connection. You'll need to ask someone with the Space administrator or Project administrator role to associate the environment with an AWS account connection.

    For more information about permissions and roles, see Granting users project permissions.

To create an environment
  1. Open the CodeCatalyst console at https://codecatalyst.aws/.

  2. Choose your project.

  3. In the navigation pane, choose CI/CD, and then choose Environments.

  4. In Environment name, enter a name, such as Production or Staging.

  5. In Environment type, select one of the following:

    • Non-production – An environment where you can test your application to make sure it's working as intended before moving it into production.

    • Production – A 'live' environment that is publicly-available and hosts your finalized application.

      If you choose Production, a Production badge appears in the UI next to any actions that the environment is associated with. The badge helps you quickly see which actions are deploying to production. Other than the appearance of the badge, there are no differences between production and non-production environments.

  6. (Optional) In Description, enter a description such as Production environment for the hello-world app.

  7. In AWS account connection - optional, choose the AWS account connection you want to associate with this environment. Workflow actions that are assigned this environment will be able to connect to the associated AWS account. For more information about creating AWS account connections in CodeCatalyst, see Allowing access to AWS resources with connected AWS accounts.

    If the AWS account connection that you want to use is not listed, it might be because it's not allowed in your project. For more information, see Configuring project-restricted account connections in the Amazon CodeCatalyst Administrator Guide.

  8. In Default IAM role, choose the IAM role you want to associate with this environment. Workflow actions that are assigned this environment will inherit this IAM role, and will be able to use it to connect to services and resources in your AWS account.

    If you need to assign the environment to multiple actions, and those actions need IAM roles that are different from the default one specified here, then you can specify the different roles on each action's Configuration tab, using the Switch role option. For more information, see Changing the IAM role of an action.

    If the IAM role that you want to use as the default is not listed, it might be because you have not added it to your AWS account connection yet. To add an IAM role to an account connection, see Adding IAM roles to account connections.

  9. (Optional) In VPC connection, choose a VPC connection that you want to associate with this environment. For more information about creating VPC connections, see Managing Amazon Virtual Private Clouds in the Amazon CodeCatalyst Administrator Guide.

    If the VPC connection that you want to use is not listed, it might be because it includes an AWS account connection that's not allowed in your project. For more information, see Configuring project-restricted account connections in the Amazon CodeCatalyst Administrator Guide.

  10. Choose Create environment. CodeCatalyst creates an empty environment.

Next steps