How do you find the latest Amazon Linux 2023 AMI without hard-coding an ID?
BeginnerProductionRapid-Fire AWS CLI
Answer
aws ssm get-parameter \
--name /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64 \
--query Parameter.Value --output text
# EKS-optimized AL2023 AMI for a Kubernetes version
aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.33/amazon-linux-2023/x86_64/standard/recommended/image_id \
--query Parameter.Value --output text
More on Rapid-Fire AWS CLI
How do you check which identity and account the CLI is using?BeginnerHow do you log in with Identity Center (SSO) from the CLI?BeginnerHow do you assume a role manually and export the credentials?IntermediateHow do you list running instances with name, ID, type and private IP in a table?BeginnerHow do you open a shell or port-forward to a private instance without SSH?BeginnerHow do you run a command on a fleet of instances by tag?Beginner