tldr/pages/common/cdk.md

33 lines
718 B
Markdown
Raw Normal View History

2020-10-28 17:41:51 +00:00
# cdk
> A CLI for AWS Cloud Development Kit (CDK).
> More information: <https://docs.aws.amazon.com/cdk/latest/guide/cli.html>.
- List the stacks in the app:
`cdk ls`
- Synthesize and print the CloudFormation template for the specified stack(s):
`cdk synth {{stack_name}}`
- Deploy one or more stacks:
2020-10-28 17:41:51 +00:00
`cdk deploy {{stack_name1 stack_name2 ...}}`
2020-10-28 17:41:51 +00:00
- Destroy one or more stacks:
2020-10-28 17:41:51 +00:00
`cdk destroy {{stack_name1 stack_name2 ...}}`
2020-10-28 17:41:51 +00:00
- Compare the specified stack with the deployed stack or a local CloudFormation template:
`cdk diff {{stack_name}}`
- Create a new CDK project in the current directory for a specified [l]anguage:
2020-10-28 17:41:51 +00:00
`cdk init -l {{language}}`
2020-10-28 17:41:51 +00:00
- Open the CDK API reference in your browser:
2022-09-20 02:34:18 +01:00
`cdk docs`