1
votes

I'm using serverless.com framework to deploy some Lambda functions to an AWS instance.

Now I need to make the same deployment to another AWS instance that I don't have access to. I have to provide only a CloudFormation stack so another team will make the deployment there.

Can I export the CloudFormation stack from AWS instance A and import that into AWS instance B? Is this supposed to work?

Thanks!

1
It's supposed to work. If you generate all the stuff in CF templates (everything- IAM users, VPCs the lot) and parameterise things like IP addresses it's ok. If you want to just do a subset in CF and copy that across it's possible but more work. There will be many more input parameters to set upVorsprung

1 Answers

1
votes

The intent of infrastructure as code tools such as CloudFormation is to make infrastructure setup and updates repeatable, so what you are describing is fine. You can retrieve the template for your stack via the cli using aws cloudformation get-template --stack-name yourstacknamehere. More info here. As long as there aren't hardcoded values that are specific to an environment in the template for things such as shared resources, it should work.