Coggle requires JavaScript to display documents.
CDK
CloudFormation
Stacks
Stack
yaml
json
cdk init app --language typescript
first-cdk
bin
first-cdk.ts
const app = new cdk.App(); new FirstCdkStack(app, 'FirstCdkStack', {});
lib
first-cdk-stack.ts
export class FirstCdkStack extends Stack { constructor(scope: Construct, id: string, props?: StackProps) { super(scope, id, props); } }
cdk synth
cdk.out
*.template.json
cdk bootstrap
cdk deploy
FirstCdkStack
synth
cdk.json
cdk init
app
{ "app": "npx ts-node --prefer-ts-exts bin/first-cdk.ts" }
npx
npm
ts-node
TypeScript
JavaScript
bin/first-cdk.ts
deploy
cdk list
cdk diff
[~] AWS::S3::Bucket someBucket someBucket8B32029D └─ [~] LifecycleConfiguration └─ [~] .Rules: └─ @@ -1,6 +1,6 @@ [ ] [ [ ] { [-] "ExpirationInDays": 5, [+] "ExpirationInDays": 2, [ ] "Status": "Enabled" [ ] } [ ] ]
cdk destroy <stack-name>