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.
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 aNextToken
. This means that if you have more than 10 resources, then some won't be included inarc.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.