Aws-cdk: Environments

Created on 10 Jul 2018  路  3Comments  路  Source: aws/aws-cdk

Model environments as arbitrary names given to some method of getting credentials to an AWS account:

  • AWS profile name
  • Some source of AWS credentials

    • Profiles

    • AWS Organizations

    • Some other way (pluggable)

They can be modeled in cdk.json files (although maybe AWS profiles don't need to me "copied" in there - they're discoverable already).

Environments may also include additional context values, too.

  • Allow using AWS SDK Profiles and AWS Organizations to map to different environments

__The CDK team have discussed this design__

@aws-cdcore managementracking

Most helpful comment

From Romain 鈥撀爉inimum bar would be letting users specify different AWS credentials profiles for different stacks in an app.

All 3 comments

@rix0rrr wrote:

I think a profile name also counts as a source of AWS credentials?

An environment should definitely also contain a region, and the account ID should be available from inside the CDK.

Here are some ideas that I'm thinking of:

  • Would be good if the CDK app defines a set of environment parameters that it expects.
  • Would be good if one of those parameters could be a list (I'm thinking for CI/CD purposes, a list of environments to deploy to).
  • Also for CI/CD, would be nice to associate arbitrary keywords with them, which can be used to construct resource names? (IAD/Beta/Prod, etc.)

From Romain 鈥撀爉inimum bar would be letting users specify different AWS credentials profiles for different stacks in an app.

This is going to be addressed as part of the CI/CD project (copy: @rix0rrr)

Was this page helpful?
0 / 5 - 0 ratings