CloudFormation SSM Parameters List

0

I was wondering if there is any news as to whether this will be supported:

"ListAWS::SSM::Parameter::Value"

It is currently documented as unsupported here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

The customer is looking to create a visual drop down in a template that is driven off of parameters and would like to be able to dynamically populate the drop down instead of hard coding.

已提问 4 年前484 查看次数
1 回答
0
已接受的回答

I can't say for the feature you're asking. But you could workaround this by maintaining the list with a lambda triggered which would "build" the list from a call to :

aws ssm get-parameters-by-path --path / --query "Parameters[*].{Name:Name}"

And store it in a parameter as a list already built to be used:

aws ssm put-parameter --name mb-tag-list --value $list --overwrite --type StringList

On update trigger a lambda through a Cloudwatch Event a lambda that get the list and update the corresponding parameter store.

I build it in a small shell script (but any language could work!) to prove that it works :

#!/bin/bash -x

list=$(aws ssm get-parameters-by-path --path / --query "Parameters[*].{Name:Name}" | jq -c 'map(.Name) | join(",")')

aws ssm put-parameter --name mb-tag-list --value $list --overwrite --type StringList
AWS
MB
已回答 4 年前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则