Questions tagged [ec2-ami]

For questions relating to virtual machine images (Amazon Machine Image) on Amazon's EC2 infrastructure.

Amazon Web Services Elastic Compute Cloud (hence, EC2) provides scalable and resizeable a la carte compute services in regions around the world. One of their goals is to "make web-scale cloud computing easier for developers".

Ec2 provides access to a large variety of compute services, ranging from a 'free tier' of smaller 'instance' types, to extremely powerful and specialized systems.

Across AWS EC2, an AMI is an Amazon Machine Image, which provides all of the information needed to launch a given machine. An AMI contains a template for the root volume of the instance (or VM), the permissions for where and how it is launched, and any block device (storage) mappings.

Any machine, including pre-configured machines of your own, can be imaged into an AMI which is then re-lauched, modified, or the like. This can be extremely useful for taking a snapshot of a machine and then redeploying it at a later time, or in a different location or availability zone.

283 questions
0
votes
0 answers

Django staticfiles not loading in AWS ec2

I've deployed a django webiste in AWS ec2 with the help of this digitalocean blog but the static files like css and javascripts are not loading after deployment. This is my django static code: STATIC_URL = '/static/' MEDIA_URL =…
Dhiman
  • 103
  • 1
  • 8
0
votes
0 answers

AWS: How to find the difference between 2 AMIs

I have an AMI that is already created from the base image ubuntu 18.04. There were some changes made to the base AMI like changing the filesystem type and also copying some files. Now the changes have not been tracked. I'm planning to build a new…
0
votes
0 answers

Kernel panic during EC2 launch

During deployment of new app version on new EC2 with template from AMI image I got following error: [ 1.670047] No filesystem could mount root, tried: [ 1.670048] [ 1.677170] Kernel panic - not syncing: VFS: Unable to mount root fs on…
maslak
  • 1,115
  • 3
  • 8
  • 22
0
votes
2 answers

EC2 Image Builder - sharing produced AMI

I'm trying to configure EC2 Image Builder for the first time using Terraform. I'm running the pipeline inside a CI/CD account and the image is used from the production and staging accounts. In other words, the AMI produced should be shared to these…
eof
  • 413
  • 4
  • 14
0
votes
1 answer

How to create EC2 AMI with Cloud Formation only before deleting that Cloud Formation stack?

My question here is I will be creating the EC2 instance using the cloud formation template, while deleting the stack I want to create the AMI of that EC2. I found some articles about how to create the AMI using the Cloud Formation template. But…
0
votes
0 answers

Instance launched from AMI can NOT be connected, original instance works fine

All: I have an EC2 instance (based on Linux 2, Kernel 4.14), which seems to be in good running condition. I am able to SSH to it (using user name and password. I enabled this). I also verified that the system can be rebooted, and after it, I can…
david
  • 101
  • 2
0
votes
1 answer

attribute error when sharing AMI using lambda

Here is my code and the error when i try to share AMIs with another account. Any thoughts would be greatly appreciated. import boto3 from datetime import datetime, timedelta target_account_id = '000123456789' def lambda_handler(event, context): …
sniphar
  • 1
  • 1
0
votes
3 answers

Automate latest AMI for EC2 Image Builder or Packer

Want to automate using any Jenkins Pipeline : How to detect the latest AMI ID available and use that for customization like additional packages ? Any other tool to detect new AMI and deploy EC2 Instance.
0
votes
1 answer

https connection fails on my ec2 amazon linux 2 for a container

I have been trying to solve my issue for two days now. I have an ec2 instance (AMI) that is hosting a docker container that works well in http (http connection to my server). I have followed this tutorial for setting up the https (SSL/TLS)…
Quentin
  • 45
  • 1
  • 7
0
votes
1 answer

Setting up Docker on EC2 instance has permission issues, how do I either reinstall Docker or fix this?

Issue When following the AWS guide for installing Docker (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html), I'm stuck on step 8 docker info. Permission should have been added in step 6 so that ec2-user can run this…
Jules
  • 303
  • 2
  • 13
0
votes
1 answer

How to pipe rails app's docker container logs to aws cloud-watch

I've rails app running with docker installed EC2 instance. I'm struggling with piping my docker container logs(STDOUT) to AWS cloudwatch console. I've already tried by installing awslogs agent on ec2 instance as described below by following link.…
0
votes
1 answer

Can't login to EC2 after changing the login user and port

Due to the client's requirement, we changed the login user and port to login into the ec2 shell. e.g. it looked like this:> ssh -i 'key.pem' changed_user@ip -p 2002. I created a snapshot out of it and then created ami. Now when I have made a new ec2…
Sohail
  • 11
  • 3
0
votes
1 answer

Mounting an Additional EBS volume to AMI with EC2 Image Builder

I am using EC2 Image Builder Service to build golden AMIs. Use Case : I want to attach additional EBS volume in the instance and there i will do all the installation of third party components and store everything there rather than doing everything…
SRJ
  • 2,092
  • 3
  • 17
  • 36
0
votes
2 answers

How can I create an AWS ec2 instance clone for redesigning website using a separate domain name?

My current ec2 instance is running original website using abc.com I have cloned the instance by saving an image and launched it as a new instance. I want to open it using a separate domain i.e. xyz.com. I have pointed A record of xyz.com to the IP…
0
votes
4 answers

How to automate EC2 Instance snapshots?

How can I automate EC2 instance snapshots every X time? By snapshot, I mean an image of all data and state and configuration of the virtual machine, so I can recover it quickly. Is there an AWS service for this purpose? What's the best way? My EC2…
kirk mads
  • 13
  • 4