Reputation: 3581
I have a cloudformation stack that I have spun in us-east-1 region with auto scaling group and multiple AZ's .
I want to now replicate that same stack in another region to make it a multi region stack and therefore help in disaster recovery.
Can that be done via cloudformation ? Also to make AWS CLI call to do clouformation create stack do I need to be in the same region to effect the call?
Upvotes: 2
Views: 578
Reputation: 2499
CloudFormation is a region level service, so all resources created by a single stack exist in one region only. You can reuse the same template to create identical stacks in additional regions if you wish.
Using the AWS CLI, you can specify which region you want to interact with either in your ~/.aws/config
file (e.g. type aws configure
to setup this file), or in the environment variable AWS_DEFAULT_REGION
, or by passing the --region
option on the command line.
Exmaple:
aws cloudformation create-stack \
--region us-east-1 \
--stack-name MyStackName \
--template-body file://MyTemplate.yaml
Upvotes: 2