[ECS] [request]: Allow viewing the previously recommended AMIs in SSM
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
Currently, SSM parameters exist for recommended AMIs such as:
`/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id`
However, this only allows retrieving the latest version. I would like to be able to specify the version of the parameter in the form:
`/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id/`
Currently trying to access any of these parameters with a version results in:
`aws ssm get-parameter --name /aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id/24`
`An error occurred (ParameterNotFound) when calling the GetParameter operation:`
**Which service(s) is this request for?**
ECS, but likely could benefit many
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
I am using this SSM parameter in a CFT to get the latest AMI for new builds, however, if I later update the template and the recommended AMI has changed, it will rebuild all of my hosts. I see the benefit in this, but I would like the choice to optionally append a version.
I think this is valuable for the following reasons:
- Templates can be exactly replicated. Currently there is possibility for the AMI to have changed if using SSM to get the AMI
- It would allow prevention of updates when it is not desired.
**Are you currently working around this issue?**
Manually changing the template to the AMI that was previously deployed if required
**Additional context**
I don't see how there is any disadvantage to anyone by allowing access to the history of these parameters
**Attachments**
Currently my template includes the following:
`LatestAmiId:`
`. Type: 'AWS::SSM::Parameter::Value'`
`. Default: '/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id'`
Contributor guide
Research direction
The issue names the AWS SSM get-parameter command and a CloudFormation template using the ECS AMI parameter; start by reproducing the versioned-parameter lookup and reviewing how the template consumes the latest value. Done means a prior recommended AMI can be retrieved by appending its version, while the existing latest-value behavior remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100