AWS cdk documentation change
Summary
Formatting and punctuation changes in troubleshooting topics, including header level adjustments and grammar fixes. Content updates include clarifying bootstrap resource creation, CloudFormation resource limits, and resource deletion policies.
Security assessment
The changes are primarily grammatical improvements and formatting adjustments. While some sections discuss IAM policies (e.g., forbidden errors) and resource deletion policies (S3/DynamoDB retention), these are standard operational considerations rather than addressing specific security vulnerabilities. No CVE, exploit mitigation, or security incident response is mentioned.
Diff
diff --git a/cdk/v2/guide/troubleshooting.md b/cdk/v2/guide/troubleshooting.md index 313a93a52..250efbd89 100644 --- a//cdk/v2/guide/troubleshooting.md +++ b//cdk/v2/guide/troubleshooting.md @@ -4,0 +5,2 @@ +After updating the AWS CDK, the AWS CDK Toolkit (CLI) reports a mismatch with the AWS Construct LibraryWhen deploying my AWS CDK stack, I receive a NoSuchBucket errorWhen deploying my AWS CDK stack, I receive a forbidden: null messageWhen synthesizing an AWS CDK stack, I get the message --app is required either in command-line, in cdk.json or in ~/.cdk.jsonWhen synthesizing an AWS CDK stack, I receive an error because the AWS CloudFormation template contains too many resourcesI specified three (or more) Availability Zones for my Auto Scaling group or VPC, but it was only deployed in twoMy S3 bucket, DynamoDB table, or other resource is not deleted when I issue cdk destroy + @@ -11 +13 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * After updating the AWS CDK, the AWS CDK Toolkit (CLI) reports a mismatch with the AWS Construct Library + * After updating the AWS CDK the AWS CDK Toolkit (CLI) reports a mismatch with the AWS Construct Library @@ -13 +15 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * When deploying my AWS CDK stack, I receive a NoSuchBucket error + * When deploying my AWS CDK stack I receive a NoSuchBucket error @@ -15 +17 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * When deploying my AWS CDK stack, I receive a forbidden: null message + * When deploying my AWS CDK stack I receive a forbidden: null message @@ -17 +19 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * When synthesizing an AWS CDK stack, I get the message --app is required either in command-line, in cdk.json or in ~/.cdk.json + * When synthesizing an AWS CDK stack I get the message --app is required either in command-line in cdk.json or in ~/.cdk.json @@ -19 +21 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * When synthesizing an AWS CDK stack, I receive an error because the AWS CloudFormation template contains too many resources + * When synthesizing an AWS CDK stack I receive an error because the AWS CloudFormation template contains too many resources @@ -21 +23 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * I specified three (or more) Availability Zones for my Auto Scaling group or VPC, but it was only deployed in two + * I specified three (or more) Availability Zones for my Auto Scaling group or VPC but it was only deployed in two @@ -23 +25 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. - * My S3 bucket, DynamoDB table, or other resource is not deleted when I issue cdk destroy + * My S3 bucket DynamoDB table or other resource is not deleted when I issue cdk destroy @@ -28 +30 @@ This topic describes how to troubleshoot the following issues with the AWS CDK. -###### After updating the AWS CDK, the AWS CDK Toolkit (CLI) reports a mismatch with the AWS Construct Library +## After updating the AWS CDK, the AWS CDK Toolkit (CLI) reports a mismatch with the AWS Construct Library @@ -49 +51 @@ To run a locally installed AWS CDK Toolkit, use the command `npx aws-cdk` instea -`npx aws-cdk` runs the local version of the AWS CDK Toolkit if one exists. It falls back to the global version when a project doesn't have a local installation. You may find it convenient to set up a shell alias to make sure `cdk` is always invoked this way. +`npx aws-cdk` runs the local version of the AWS CDK Toolkit if one exists. It falls back to the global version when a project doesn’t have a local installation. You may find it convenient to set up a shell alias to make sure `cdk` is always invoked this way. @@ -63,3 +65 @@ Windows -(back to list) - -###### When deploying my AWS CDK stack, I receive a `NoSuchBucket` error +## When deploying my AWS CDK stack, I receive a `NoSuchBucket` error @@ -74 +74 @@ To avoid generating unexpected AWS charges, the AWS CDK does not automatically b -By default, the bootstrap resources are created in the Region or Regions that are used by stacks in the current AWS CDK application. Alternatively, they are created in the Region specified in your local AWS profile (set by `aws configure`), using that profile's account. You can specify a different account and Region on the command line as follows. (You must specify the account and Region if you are not in an app's directory.) +By default, the bootstrap resources are created in the Region or Regions that are used by stacks in the current AWS CDK application. Alternatively, they are created in the Region specified in your local AWS profile (set by `aws configure`), using that profile’s account. You can specify a different account and Region on the command line as follows. (You must specify the account and Region if you are not in an app’s directory.) @@ -81,3 +81 @@ For more information, see [AWS CDK bootstrapping](./bootstrapping.html). -(back to list) - -###### When deploying my AWS CDK stack, I receive a `forbidden: null` message +## When deploying my AWS CDK stack, I receive a `forbidden: null` message @@ -87,3 +85 @@ You are deploying a stack that requires bootstrap resources, but are using an IA -(back to list) - -###### When synthesizing an AWS CDK stack, I get the message `--app is required either in command-line, in cdk.json or in ~/.cdk.json` +## When synthesizing an AWS CDK stack, I get the message `--app is required either in command-line, in cdk.json or in ~/.cdk.json` @@ -91 +87 @@ You are deploying a stack that requires bootstrap resources, but are using an IA -This message usually means that you aren't in the main directory of your AWS CDK project when you issue `cdk synth`. The file `cdk.json` in this directory, created by the `cdk init` command, contains the command line needed to run (and thereby synthesize) your AWS CDK app. For a TypeScript app, for example, the default `cdk.json` looks something like this: +This message usually means that you aren’t in the main directory of your AWS CDK project when you issue `cdk synth`. The file `cdk.json` in this directory, created by the `cdk init` command, contains the command line needed to run (and thereby synthesize) your AWS CDK app. For a TypeScript app, for example, the default `cdk.json` looks something like this: @@ -98 +94 @@ This message usually means that you aren't in the main directory of your AWS CDK -We recommend issuing `cdk` commands only in your project's main directory, so the AWS CDK toolkit can find `cdk.json` there and successfully run your app. +We recommend issuing `cdk` commands only in your project’s main directory, so the AWS CDK toolkit can find `cdk.json` there and successfully run your app. @@ -100 +96 @@ We recommend issuing `cdk` commands only in your project's main directory, so th -If this isn't practical for some reason, the AWS CDK Toolkit looks for the app's command line in two other locations: +If this isn’t practical for some reason, the AWS CDK Toolkit looks for the app’s command line in two other locations: @@ -114,3 +110 @@ For example, you might synthesize a stack from a TypeScript app as follows. -(back to list) - -###### When synthesizing an AWS CDK stack, I receive an error because the AWS CloudFormation template contains too many resources +## When synthesizing an AWS CDK stack, I receive an error because the AWS CloudFormation template contains too many resources @@ -124 +118 @@ The AWS CloudFormation resource limit is 500 at this writing. See [AWS CloudForm -The AWS Construct Library's higher-level, intent-based constructs automatically provision any auxiliary resources that are needed for logging, key management, authorization, and other purposes. For example, granting one resource access to another generates any IAM objects needed for the relevant services to communicate. +The AWS Construct Library’s higher-level, intent-based constructs automatically provision any auxiliary resources that are needed for logging, key management, authorization, and other purposes. For example, granting one resource access to another generates any IAM objects needed for the relevant services to communicate. @@ -149 +143 @@ You can get an exact count of the resources in your synthesized output using the -As your stack's resource count approaches the limit, consider re-architecting to reduce the number of resources your stack contains: for example, by combining some Lambda functions, or by breaking your stack into multiple stacks. The CDK supports [references between stacks](./resources.html#resource-stack), so you can separate your app's functionality into different stacks in whatever way makes the most sense to you. +As your stack’s resource count approaches the limit, consider re-architecting to reduce the number of resources your stack contains: for example, by combining some Lambda functions, or by breaking your stack into multiple stacks. The CDK supports [references between stacks](./resources.html#resource-stack), so you can separate your app’s functionality into different stacks in whatever way makes the most sense to you. @@ -155,3 +149 @@ AWS CloudFormation experts often suggest the use of nested stacks as a solution -(back to list) - -###### I specified three (or more) Availability Zones for my Auto Scaling group or VPC, but it was only deployed in two +## I specified three (or more) Availability Zones for my Auto Scaling group or VPC, but it was only deployed in two @@ -159 +151 @@ AWS CloudFormation experts often suggest the use of nested stacks as a solution -To get the number of Availability Zones that you request, specify the account and Region in the stack's `env` property. If you do not specify both, the AWS CDK, by default, synthesizes the stack as environment-agnostic. You can then deploy the stack to a specific Region using AWS CloudFormation. Because some Regions have only two Availability Zones, an environment-agnostic template doesn't use more than two. +To get the number of Availability Zones that you request, specify the account and Region in the stack’s `env` property. If you do not specify both, the AWS CDK, by default, synthesizes the stack as environment-agnostic. You can then deploy the stack to a specific Region using AWS CloudFormation. Because some Regions have only two Availability Zones, an environment-agnostic template doesn’t use more than two. @@ -165 +157 @@ In the past, Regions have occasionally launched with only one Availability Zone. -You can change this behavior by overriding your stack's [`availablilityZones`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html#availabilityzones) (Python: `availability_zones`) property to explicitly specify the zones that you want to use. +You can change this behavior by overriding your stack’s [availabilityZones](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html#availabilityzones) (Python: `availability_zones`) property to explicitly specify the zones that you want to use. @@ -167 +159 @@ You can change this behavior by overriding your stack's [`availablilityZones`](h -For more information about specifying a stack's account and region at synthesis time, while retaining the flexibility to deploy to any region, see [Environments for the AWS CDK](./environments.html). +For more information about specifying a stack’s account and region at synthesis time, while retaining the flexibility to deploy to any region, see [Environments for the AWS CDK](./environments.html). @@ -169,3 +161 @@ For more information about specifying a stack's account and region at synthesis -(back to list) - -###### My S3 bucket, DynamoDB table, or other resource is not deleted when I issue `cdk destroy` +## My S3 bucket, DynamoDB table, or other resource is not deleted when I issue `cdk destroy` @@ -175 +165 @@ By default, resources that can contain user data have a `removalPolicy` (Python: -If you set a resource's removal policy to `DESTROY`, that resource will be deleted when the stack is destroyed. +If you set a resource’s removal policy to `DESTROY`, that resource will be deleted when the stack is destroyed. @@ -266,3 +256 @@ C# -AWS CloudFormation cannot delete a non-empty Amazon S3 bucket. If you set an Amazon S3 bucket's removal policy to `DESTROY`, and it contains data, attempting to destroy the stack will fail because the bucket cannot be deleted. You can have the AWS CDK delete the objects in the bucket before attempting to destroy it by setting the bucket's `autoDeleteObjects` prop to `true`. - -(back to list) +AWS CloudFormation cannot delete a non-empty Amazon S3 bucket. If you set an Amazon S3 bucket’s removal policy to `DESTROY`, and it contains data, attempting to destroy the stack will fail because the bucket cannot be deleted. You can have the AWS CDK delete the objects in the bucket before attempting to destroy it by setting the bucket’s `autoDeleteObjects` prop to `true`.