Skip to content

Commit

Permalink
update to how env works
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry Kindall committed Apr 26, 2021
1 parent e84d742 commit 203e5db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc_source/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Issue `cdk version` to display the version of the AWS CDK Toolkit\. Provide this
To gain insight into how the AWS CDK is used, the constructs used by AWS CDK applications are collected and reported by using a resource identified as `AWS::CDK::Metadata`\. This resource is added to AWS CloudFormation templates, and can easily be reviewed\. This information can also be used by AWS to identify stacks using a construct with known security or reliability issues, and to contact their users with important information\.

**Note**
Prior to version 1\.93\.0, the AWS CDK reported the names and versions of the modules loaded during synthesis, rather than the constructs used in te stack\.
Prior to version 1\.93\.0, the AWS CDK reported the names and versions of the modules loaded during synthesis, rather than the constructs used in the stack\.

By default, the AWS CDK reports the use of constructs in the following NPM modules that are used in the stack:
+ AWS CDK core module
Expand Down Expand Up @@ -119,7 +119,7 @@ To opt out of version reporting, use one of the following methods:

## Specifying credentials and region<a name="cli-environment"></a>

The CDK Toolkit needs to know your AWS credentials and the AWS region into which you are deploying, not only for deployment operations but also to retrieve context values during synthesis\. Together, your account and region make up the *environment*\.
The CDK Toolkit needs to know your AWS account credentials and the AWS region into which you are deploying, not only for deployment operations but also to retrieve context values during synthesis\. Together, your account and region make up the *environment*\.

**Important**
We strongly recommend against using your main AWS account for day\-to\-day tasks\. Instead, create a user in IAM and use its credentials with the CDK\.
Expand All @@ -132,6 +132,8 @@ Credentials and region may be specified using environment variables or in config
**Note**
The standard AWS `config` and `credentials` files are located at `~/.aws/config` and `~/.aws/credentials` \(macOS/Linux\) or `%USERPROFILE%\.aws\config` and `%USERPROFILE%\.aws\credentials` \(Windows\)\.

The environment specified in your AWS CDK app using the stack's `env` property is used during synthesis to generate an environment\-specific AWS CloudFormation template and during deployment to override the account or region specified by one of the above methods\. For more information, see [Environments](environments.md)\.

If you have the AWS CLI installed, the easiest way to configure your account credentials and a default region is to issue the following command:

```
Expand Down Expand Up @@ -187,8 +189,6 @@ Although the AWS CDK uses credentials from the same sources files as other AWS t

You may optionally use the `--role-arn` \(or `-r`\) option to specify the ARN of an IAM role that should be used for deployment\. This role must be assumable by the AWS account being used\.

The environment specified in your AWS CDK app using the stack's `env` property is used during synthesis to generate an environment\-specific AWS CloudFormation template\. It does not affect deployment\. For more information, see [Environments](environments.md)\.

## Specifying the app command<a name="cli-app-command"></a>

Many features of the CDK Toolkit require one or more AWS CloudFormation templates be synthesized, which in turn requires running your application\. Since the AWS CDK supports programs written in a variety of languages, it uses a configuration option to specify the exact command necessary to run your app\. This option can be specified in two ways\.
Expand Down

0 comments on commit 203e5db

Please sign in to comment.