- 최신
- 최다 투표
- 가장 많은 댓글
With AWS CDK, the stacks you write are managed by a CDK app, or a project. You can name your source files in your project as you wish, you can rename the files freely. Renaming a file does not affect the file content.
When you deploy a CDK app using cdk deploy
, an AWS CloudFormation stack (or multiple stacks) will be generated behind the scenes.
The physical names of the AWS CloudFormation stacks are automatically determined by the AWS CDK based on the stack's construct path in the tree. By default, a stack's name is derived from the construct ID of the Stack
object. You provide the stack ID as a string in your code, like this:
const app = new App(); new MyFirstStack(app, 'MyStack1');
If you don't change the stack ID in your code, CDK will generate the same CloudFormation stack name and thus will update your existing (deployed) stack next time you run cdk deploy
, instead of creating a new one.
In a nutshell:
- you can rename your CDK project files as you want
- update the resource configuration in your CDK code as you need
- run
cdk deploy
- as long as you do not change the construct IDs, CDK will figure out whether it should create new resources or update existing ones
You can read more about how CDK works in the documentation.
관련 콘텐츠
- AWS 공식업데이트됨 10달 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 일 년 전