1 Answer
- Newest
- Most votes
- Most comments
0
Hello, I think this can help you in obtaining the dynamic list.
- Create an SSM parameter (e.g.,
/myapp/rds_instance_ids
) of typeString
to store the list of RDS instance IDs. - Develop a Lambda function with permissions to call the
ssm:GetParametersByPath
API. - Write code in the Lambda function to fetch the list of RDS instance IDs and update the SSM parameter.
- Configure a CloudWatch Event rule to trigger the Lambda function at regular intervals (e.g., every hour).
- Define a parameter in the CloudFormation template (e.g.,
RDSInstanceIDParameter
) withAllowedValues
referencing the SSM parameter created in step 1.
CloudFormation template will dynamically fetch the latest list of RDS instance IDs from the SSM parameter upon deploy of the stack. Hope This Helps
Relevant content
- Accepted Answerasked a year ago
- asked 10 months ago
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
Grazie mille for Your effort and response . But I am afraid, what I want is not possible .
I have tried following but it seems , that reference is not interpreted (When I used it for tag it worked, see picture below).
Result:
I have also tried to use 'Fn::Transform' with macro/lambda function to modify content , but the Stack interpreter seems don't like it. For modifying resources on the fly it worked fine.
Error
If you have any other ideas, I'm curious about them.