View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000124 | AlmaLinux-8 | -OTHER | public | 2021-09-02 02:53 | 2021-09-02 22:45 |
Reporter | fdr | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Summary | 0000124: Improve AWS AMI ID acquisition instructions | ||||
Description | AlmaLinux's documentation on how to find AMIs could be expanded for the benefit of those that want to automatically acquire new base images. Compare https://web.archive.org/web/20210720172500/https://wiki.almalinux.org/cloud/AWS.html to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html. Some differences: * AlmaLinux has both Marketplace and "Community" AMIs. Is the Marketplace one "official?" is the "community" account number -- not documented anywhere -- held in as strict confidence as images that make it to the marketplace? Why would I use one or the other? Why am I given this choice? Whereas, Amazon Linux really has only one method: public images, most comparable to "community" AMIs. "System Manager" is used to retrieve latest AMI ID. An older way to do something similar is to make careful use of naming conventions and a well-known account number. CentOS offers their account number, https://wiki.centos.org/Cloud/AWS. So does Oracle Linux, https://community.oracle.com/tech/apps-infra/discussion/4417739/launch-an-oracle-linux-instance-in-aws * A major downside of Marketplace is that it's necessary to associate the product subscription with each account using it. This has different APIs, different SDKs, different IAM policies required than what would be required for most programs using EC2. * AWS provides precise API calls used to get the latest AMI, indicating how they anticipate you will source new image IDs, and will keep it working. None of the other systems do, but they should, and in practice, code of this kind works practically indefinitely: images( owners: ["764336703387"], filters: [ {name: "name", values: ["AlmaLinux OS 8.* x86_64"]}, {name: "state", values: ["available"]} ] ).max_by { |img| img.creation_date }.id The following such wildcarded strings can be useful for different levels of automatic updates: AlmaLinux OS * x86_64 AlmaLinux OS 8.* x86_64 AlmaLinux OS 8.4.* x86_64 | ||||
Tags | aws, cloud | ||||
abrt_hash | |||||
URL | |||||
|
For more information about this "parameter store" that Amazon Linux uses, see https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html. I haven't used this much myself, but I seem to remember following AWS instructions to use it in the past and it was no sweat. |