How to create an EC2 instance without the specified Image-Id in the AWS template?

I want to create an instance of ECO EC RHEL using the AWS template. I currently do not have an RHEL instance. Therefore, I do not have an image id.

+4
source share
1 answer

Red Hat supports RHEL AMI. We can use the describe-images CLI to request our public AMI based on:

  • Account ID: 309956199498
  • Well-known string pattern corresponding to their AMI names: RHEL-*_HVM_GA-*-Hourly2-GP

CreationDate, ( -1) Name, ImageId CreationDate.

:

aws ec2 describe-images \
    --owners 309956199498 \
    --filters "Name=name,Values=RHEL-*_HVM_GA-*-Hourly2-GP2" \
    --query 'sort_by(Images, &CreationDate)[-1].[Name, ImageId, CreationDate]' \
    --output text

:

RHEL-7.3_HVM_GA-20161026-x86_64-1-Hourly2-GP2   ami-b63769a1    2016-10-26T22:32:29.000Z

, , , " " AWS Console EC2 " " AMR RHEL, , RHEL AMI ami-b63769a1.

AWS EC2 console featuring the latest RHEL AMI.

ImageId .

:

+3

Source: https://habr.com/ru/post/1661838/


All Articles