Este conteúdo não está disponível no idioma selecionado.

5.2.  Uploading an AMI image to AWS


This section describes how to upload an AMI image to AWS.

Prerequisites

  • Your system must be set up for uploading AWS images.
  • You must have an AWS image created by Image Builder. Use the ami output type in CLI or Amazon Machine Image Disk (.ami) in GUI when creating the image.

Procedure

1. Push the image to S3:
$ $ AMI=8db1b463-91ee-4fd9-8065-938924398428-disk.ami
Copy to Clipboard Toggle word wrap
$  aws s3 cp $AMI s3://$BUCKET Completed 24.2 MiB/4.4 GiB (2.5 MiB/s) with 1 file(s) remaining ...
Copy to Clipboard Toggle word wrap
2. After the upload to S3 ends, import the image as a snapshot into EC2:
$ A printf '{ "Description": "my-image", "Format": "raw", "UserBucket": { "S3Bucket": "%s", "S3Key": "%s" } }' $BUCKET $AMI > containers.json
Copy to Clipboard Toggle word wrap
$ aws ec2 import-snapshot  disk-container file://containers.json
Copy to Clipboard Toggle word wrap
Replace my-image with the name of the image.
To track progress of the import, run:
$ aws ec2 describe-import-snapshot-tasks --filters Name=task-state,Values=active
Copy to Clipboard Toggle word wrap
3. Create an image from the uploaded snapshot by selecting the snapshot in the EC2 console, right clicking on it and selecting Create Image:

Figure 5.1. Create Image

4. Select the Virtualization type of Hardware-assisted virtualization in the image you create:

Figure 5.2. Virtualization type

5. Now you can run an instance using whatever mechanism you like (CLI or AWS Console) from the snapshot. Use your private key via SSH to access the resulting EC2 instance. Log in as ec2-user.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat