I'm new to Cloud Formation. I want to update the settings of already created a lot of RDS instances using Cloud Formation. I don't have the info about either those resources were created through CF or manually. Is it possible to update such resources with CF? I can think of another way like I can use AWS SDK (boto3) but doing it with CF is perefrable.
Asked
Active
Viewed 194 times
1
-
Only through custom resources. – Marcin Jul 25 '22 at 06:03
-
Can you explain? How we can do this using custom resources? – Abdul Haseeb Jul 25 '22 at 06:16
1 Answers
3
The only way to do this from CloudFormation (CF) is to develop your own CF custom resource. This will be a lambda function which will use AWS SDK to query the state of your RDS databases, and perform any actions you want.
Since its fully custom, you can program any logic which satisfies your requirements.
If the resources were created manually, you can also import them to CF, and then update using CF.

Marcin
- 215,873
- 14
- 235
- 294
-
okay, so there isn't a way that. I define only that configuration in the RDS CF template which I want to update and pass DB identified to CF? – Abdul Haseeb Jul 25 '22 at 06:28
-
@AbdulHaseeb This is the only way if you don't know if "those resources were created through CF or manually". – Marcin Jul 25 '22 at 06:32
-
what if those were created through CF then what will be the possible solution? – Abdul Haseeb Jul 25 '22 at 06:40
-
@AbdulHaseeb Then just edit your CF template and update your stack. Nothing special about that. – Marcin Jul 25 '22 at 06:41
-
https://stackoverflow.com/questions/73134809/cloud-formation-for-cloud-watch-alarms-on-metrics-generated-by-cw-agent – Abdul Haseeb Jul 27 '22 at 08:51
-
If you have some time can you please go through the above question. Thanks – Abdul Haseeb Jul 27 '22 at 08:51