When to Use Parameter Store vs Dynamic References in CloudFormation?

0
0
Asked By CuriousCat42 On

I just learned that CloudFormation can refer to Parameter Store and Secrets Manager values in two primary ways: through a special parameter type in the `Parameters` section and using a dynamic reference inline. I'm curious about the differences between these two methods in terms of when to use each. Can anyone break it down for me?

1 Answer

Answered By TechieGuru99 On

Both methods work well, but they have different implications for how CloudFormation handles them. Using a parameter type is like creating a variable for your stack—it's reusable and keeps secrets hidden from logs, which is great for security. However, it only resolves when you update the entire stack.
On the other hand, the dynamic reference approach drops the secret pointer directly into your resource definition, fetching it fresh whenever the resource is created or updated. This is ideal for situations where you always want the latest password, but it’s less reusable.
**Rule of thumb:** Use parameter types for reusable secrets at the stack level, and go with dynamic references for one-off secrets tied to specific resources.

PasswordPal23 -

This is the way!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.