Deploying into AWS accounts and VPCs - Amazon CodeCatalyst

Deploying into AWS accounts and VPCs

Using CodeCatalyst workflows, you can deploy applications and other resources to target AWS accounts and Amazon VPCs in the AWS cloud. To enable these deployments, you must set up CodeCatalyst environments.

A CodeCatalyst environment, not to be confused with a Dev Environment, defines the target AWS account and optional Amazon VPC that a CodeCatalyst workflow connects to. An environment also defines the IAM role that a workflow needs to access the AWS services and resources within the target account.

You can set up multiple environments and give them names such as development, test, staging, and production. When you deploy into these environments, information about the deployments appears on the CodeCatalyst Deployment activity and Deployment targets tabs in the environment.

How do I get started with environments?

The high-level steps to add and use a CodeCatalyst environment are as follows:

  1. In your CodeCatalyst space, connect one or more AWS accounts. During this process, add the IAM roles that your workflow requires to access resources in your AWS account. For more information, see Allowing access to AWS resources with connected AWS accounts.

  2. In your CodeCatalyst project, create an environment that includes one of the AWS accounts and IAM roles from step 1. For more information, see Creating an environment.

  3. In your CodeCatalyst project, in a workflow, add an action that points to the environment you created in step 2. For more information, see Adding an action to a workflow.

    You have now configured an environment. The action can now deploy resources into the AWS account specified in the environment.

Note

You can also add an Amazon VPC to the environment. For more information, see Adding VPC connections for a space in the CodeCatalyst Administration Guide and Associating a VPC with an environment.

Can multiple environments exist within a single workflow?

Yes. If a workflow includes multiple actions, each of those actions can be assigned an environment. For example, you could have a workflow that includes two deploy actions, where one is assigned a my-staging-enviroment environment and another is assigned a my-production-environment environment.

Which workflow actions support environments?

Any workflow action that deploys resources into the AWS cloud, or communicates with AWS services for other reasons (such as monitoring and reporting), supports environments.

Which actions support having their deployment information displayed in CodeCatalyst?

Of the workflow actions that support environments, only a few support having their deployment information displayed on the Deployment activity and Deployment targets pages of the CodeCatalyst console.

The following workflow actions support having their deployment information displayed:

Supported Regions

The Environments page can display resources in any AWS Region.

Is an environment mandatory?

An environment is mandatory if the workflow action to which it is assigned deploys resources into the AWS cloud, or communicates with AWS services for other reasons (such as monitoring and reporting).

For example, if you have a build action that builds an application but doesn't need to communicate with your AWS account or Amazon VPC, then you do not need to assign an environment to the action. If, however, the build action sends logs to the Amazon CloudWatch service in your AWS account, then the action must have an environment assigned.