First, create yaml template. Stack parameters are the same as CloudFormation.createStack()
in the SDK.
- Create yaml template:
Stacks:
- StackName: sample-stack
TemplateURL: https://s3-ap-northeast-1.amazonaws.com/bucket-name/stack-template.yaml
Capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM']
Parameters:
- ParameterKey: BucketName
ParameterValue: hello-cfn-chain
Next, execute the command.
- Execute the command:
$ node main.js ./chain-sample.yaml
- If stack creation fails, created stacks will be deleted. But, if stack deletion fails due by some problem, processing stops.