architect / functions-python

AWS Lambda Python runtime helpers for Architect apps
Apache License 2.0
14 stars 7 forks source link

Find ssm parameters recursively #18

Closed bardbachmann closed 1 year ago

bardbachmann commented 3 years ago

Issue

It seems that when you have more than 10 ssm parameters, then ssm.get_parameters_by_path(Path=path, Recursive=True) will only fetch the first ten, then return a NextToken. This means that if you have more than 10 resources, then some won't be included in arc.reflect()

Solution

I've tried writing code that will recursively retrieve all the parameters. As long as the result includes a NextToken, then it will try to recursively retrieve more parameters.

Disclaimer: I'm very new to Python, so there might be better ways to do this.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.