Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:58:01+00:00 2026-06-02T18:58:01+00:00

The ec2-run-instances command needs an AMI ID and the ID is different across all

  • 0

The ec2-run-instances command needs an AMI ID and the ID is different across all regions. Is there any way to specify that I need an AMI that will be suitable for region x / zone y and instance_type z?

In other words I need a way to use some “default” AMI so that I can write a script that will work across all EC2 regions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:58:02+00:00Added an answer on June 2, 2026 at 6:58 pm

    There is nothing like a default AMI for Amazon EC2, and no concept of selecting a default (or rather the region specific) AMI amongst the otherwise identical AMIs with different IDs per region either (a region independent AMI ID would be a nifty improvement though).

    This is usually solved by adding a respective mapping to your script, thus depends on the scripting environment in use (a simple map should always be available somehow) – e.g. AWS CloudFormation uses the very same approach itself, see the sample EC2ChooseAMI.template, which is an example of using Mappings to select an AMI based on region and instance type.

    The AWSRegionArch2AMI map achieves what you desire, plus offering a choice of architecture as well (which implies a hint why a default AMI ID could not be as easy to implement then it might look at fist sight).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

AWS has several locations for storage and EC2 instances to run upon with different
I'm trying to run a bash script when my EC2 instances start up. All
The command line tool ec2-run-instances takes a -f parameter to pass a file to
I use bat file to launch Amazon Instances by this code: ec2-run-instances %AMI_Id% -k
I'm trying to configure puppetmaster and puppet clients using Ubuntu 11.10 EC2 Instances (ami-a562a9cc).
I created a small Amazon EC2 instance like this: ec2-run-instances --group default --block-device-mapping /dev/sda1=:16:off
Hi have 1 EC2 instance that is stopped. (Ubuntu Rails App Server (ami-e49e758d)) But
I'm using thin to run my rails app on ec2. How do I specify
I have a program that I run on amazon EC2 and I would like
I'm building a script that will run on an EC2 instance that will automatically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.