1

I'm creating a cloud formation template that I would like to use to run and create an environment. The only problem is that I have an existing database that I would like to form a part of this stack.

Can I 'swap' an RDS instance within a stack if I were to launch my cloud formation stack that contains an RDS instance once I have set it up?

I can't see any other way of doing other than to back up my database, take it down and then bring it back up again from the backup.

  • I am looking for an answer to this exact question. Did you work this out? – David Poxon Dec 25 '16 at 22:43
1

Your terminology isn't very accurate so its hard to tell what you are trying to do.

Cloudformation creates "stacks". You can create a stack that contains an RDS instance.

If you want to update a stack, you can upload an updated JSON template to that stack. The only changes that will be applied to the stack are the changes from the original JSON template that was used to create the stack.

So, if you have an RDS instance in the stack, and your updated template does not include any changes to that RDS instance, applying an updated template (which changes other parts of your stack) will not impact your RDS instance.

If your updated template contains changes to your RDS instance, then, depending on what those changes are, your existing RDS instance could be deleted.

I would advise testing on a dummy stack first.

| improve this answer | |
  • Thanks, I have become a bit more familiar with this now since I posted the question. My existing RDS will have to sit outside of my cloudformation stack for now until I can bring up an instance of it from a backup or something. – Luke May 24 '16 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.