4.1.2 - AWS Image
This article will walk you through the process of identifying the correct Amazon Machine Image (AMI) for your project, using the AWS Console, the AZ CLI and the AZ Powershell module.
image:
ubuntu:
publisher: Canonical
product: UbuntuServer
sku: 18.04-LTS
venue:
aws:
image_id: ami-0c4c42893066a139e
windows:
publisher: MicrosoftWindowsServer
product: WindowsServer
sku: 2016-Datacenter
venue:
aws:
image_id: ami-04bb0cc469b2b81cc
In this example I have both the Azure and AWS stanzas defined. This makes the Blueprint entirely portable.
Using the AWS Console
Open the Amazon EC2 console.
If you are not already logged in, please select the region that you wish to deploy to.
From here select Images/AMIs in the left-hand menu.
From here you can use the GUI tools to search and filter the results to arrive at the image that you require. You can select Public, Private and Owned by me. Additionally, if you click the search bar, you can select any of the attributes (columns) and search within them.

Once you have found your image, take a note of the AMI ID field as you'll need this later
Using the AWS CLI
If you prefer to use the Cloud Shell, then you can start immediately with the AWS CLI
Identifying AMIs
To identify the appropriate image, you can use the describe-images subcommand. In this example, I am filtering for my region, images supplied by Amazon and matching the field platform=windows.
aws ec2 describe-images \
--region eu-west-1 \
--owners amazon \
--filters "Name=platform,Values=windows"
This will return (multiple examples of):
|+---------------------------------------------------------------------+----------------------------------------------------------------------+|
| Images |
|+-------------------------+------------------------------------------------------------------------------------------------------------------+|
| Architecture | x86_64 |
| CreationDate | 2017-07-22T06:36:32.000Z |
| Description | |
| EnaSupport | True |
| Hypervisor | xen |
| ImageId | ami-ff5bb586 |
| ImageLocation | amazon/aws-elasticbeanstalk-amzn-2017.07.13.x86_64-WindowsServer2012R2Core-hvm-201707220524 |
| ImageOwnerAlias | amazon |
| ImageType | machine |
| Name | aws-elasticbeanstalk-amzn-2017.07.13.x86_64-WindowsServer2012R2Core-hvm-201707220524 |
| OwnerId | 102837901569 |
| Platform | windows |
| PlatformDetails | Windows |
| Public | True |
| RootDeviceName | /dev/sda1 |
| RootDeviceType | ebs |
| SriovNetSupport | simple |
| State | available |
| UsageOperation | RunInstances:0002 |
| VirtualizationType | hvm |
|+-------------------------+------------------------------------------------------------------------------------------------------------------+|
Once you have found your image, take a note of the ImageId field as you'll need this later.
Local CLI Initial Login
To do the initial configuration of a local CLI installation, you can issue the command:
aws configure
This will then prompt you to enter the following information:
AWS Access Key ID [None]: ****************J2OR
AWS Secret Access Key [None]: ****************ArK6
Default region name [None]: eu-west-2
Default output format [None]: table
If you would like to interrogate the configuration, you can issue the following two commands:
cat ~/.aws/credentials
[default]
aws_access_key_id = ****************J2OR
aws_secret_access_key = ****************ArK6
cat ~/.aws/config
[default]
region = eu-west-2
output = table
Using the AMI
The final step is to take the AMI ID/ImageId and add that to the Blueprint. Using the example from the AWS CLI example, it might look something like this:
windows-2012r2:
venue:
aws:
image_id: ami-ff5bb586
And that's it. You are now ready to go ahead and deploy your image.
Last updated
Was this helpful?