1 個回答
- 最新
- 最多得票
- 最多評論
1
Hi,
What you want to do can be achieved with a Custom Resource. This is a type of resource in Cloudformation that excutes (and waits for a response from) a Lambda function.
The way it would work in your scenario would be to remove the option of the AZ from the parameters sections completely.
Create a Lambda that does the lookup logic you describe and return the AZ. Then trigger this Lambda from a Custom Resource, this custom resource would then have a !Ref
or !GetAtt
value that you can access to populate the AZ value for the instance in place of using a parmeter.
I hope this helps.
If you are likely to create your Lambda in Python then there is a helper library specifically designed to make Custom Resources simpler to create in Python.
已回答 6 個月前
相關內容
- 已提問 6 個月前
- AWS 官方已更新 3 年前