I am trying to query the AMI by lookup up the AMI Alias in SM Parameter Store for a specific version of Amazon ECS-Optimized Amazon Linux 2 AMI. The AMI Alias listed on Marketplace (https://aws.amazon.com/marketplace/server/configuration?productId=9c5eb799-bb6a-4a52-8fda-8e90b3f751f1) is Ami Alias: /aws/service/marketplace/prod-phaazl5qm6pka/2.0.20220121
When I query Name: equals: /aws/service/marketplace/prod-phaazl5qm6pka/2.0.20220121
I get "You do not have any parameters in this region."
I am able to query the "latest" version of the AMI Alias with a query Name: equals: /aws/service/marketplace/prod-phaazl5qm6pka/latest
and get back exactly on result that has a string value with the expected AMI (currently ami-0e4efed85dffc2b28
for us-east-2
).
I want to create some automation that uses the AMI Alias for specific version, and not "latest" and be able to lookup the AMI by region. What am I doing wrong in my query? Or am I maybe missing some permissions or something somewhere?
Can you point me to where you see this in the documentation? I appreciate the answer and will look into this some more. I'd like to understand how to navigate the documentation around this more and where to find what you are referencing.
See: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-public-parameters-ami.html
And yeah, you can get the latest ami if you remove the date from the ami name alias , for example in this case: amzn2-ami-ecs-hvm-2.0.20220121-x86_64-ebs without date would be : amzn2-ami-ecs-hvm--x86_64-ebs