AWS Cloud Development Kit: Difference between revisions

Content deleted Content added
GuoLuoZhin (talk | contribs)
mNo edit summary
m Example code: syntax highlight
Line 43:
The following is AWS CDK code written in TypeScript that creates an Amazon S3 bucket with public read access. This code imports the necessary AWS CDK libraries to create a new CloudFormation stack with a single Amazon S3 bucket resource. The Bucket constructor is used to create the bucket with the specified properties, including encryption, block public access, public read access, and versioning. The removal policy property specifies that the bucket should be destroyed when the stack is deleted.
 
<syntaxhighlight lang="typescript">
<pre>
import { Construct, Stack, StackProps } from 'aws-cdk-lib';
import { Bucket } from 'aws-cdk-lib/aws-s3';
Line 62:
}
}
</syntaxhighlight>
</pre>
 
== See also ==