284 questions
-1
votes
2
answers
379
views
Is it safe to store hashed password in /etc/cloud/cloud.cfg of cloud-init? [closed]
I am creating a custom AMI for my AWS EC2 Instances. I am trying to configure a user's password via cloud-init. I am doing it using passwd in cloud-init's config.
I was surprised to find out that ...
0
votes
1
answer
91
views
AWS on demand EC2 instances charges breakup for an hour
I need to know if there is a way to get a break up of an Hourly charge on demand instances.
Instance Type
Hourly rate
vCPU
Memory
t3.xlarge
$0.1888
4
16Gb
Lets for an instance, Hourly rate of t3....
2
votes
2
answers
2k
views
How to dynamically tag an AMI created by an EC2 Image Builder
I have an EC2 Image Builder which is triggered when an new version of a package is pushed to CodeArtifact. I would like to tag the resulting AMI with the version of the package that triggered the ...
0
votes
0
answers
142
views
Configure AWS CLI by Bootstrap User Data in EC2
I am new to AWS. I wish to know -
how to configure AWS-CLI (setup access and secret keys) automatically
by bootstrap the EC2 instance, such that when somebody logs into
the running instance he gets ...
0
votes
1
answer
299
views
how to put a hook in terraform main.tf as shell script to enable the additional EBS volume for delete_on_termination
I need a help to create the hook in shell script under main.tf file so that whenever i spin the server and additional ebs volume should get enabled for deleteontermination. below i have shared the ...
0
votes
1
answer
299
views
All pip packages missing when create instance from image
I am a new user to AWS
I installed my package with packer and successfully created AMI, and all packages works good.
e2esa-packer.amazon-ebs.my-ami: Name: Django
e2esa-packer.amazon-ebs.my-ami: ...
0
votes
1
answer
1k
views
Cannot connect to streamlit app hosted on EC2 instance
I have been banging my head against a wall trying to get my streamlit app deployed on an ec2 instance so I can share with others, however I am having trouble connecting to my streamlit app via the ...
1
vote
2
answers
3k
views
While copying an AMI image (from one region to another) in AWS create's an error that "The storage for the ami is not available in the source region"
In AWS I create an AMI image and copy that particular image from one region to another region but it generates an error that "Failed to copy AMI - The storage for the ami is not available in the ...
0
votes
0
answers
1k
views
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 ...
-1
votes
2
answers
2k
views
AWS EC2 2022 - Disconnected: No supported authentication method available
I am trying to launch AWS EC2 instance with Ubuntu AMI. The username is ubuntu.
Before the launch, I created my key using .ppk option checked:
After launching EC2, I can see the key I selected is ...
0
votes
0
answers
475
views
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 ...
1
vote
1
answer
890
views
AWS EC2 User Data Not Running, Node Not Saved for AMIs
I'm running the following user data script for my AWS EC2 on an Amazon Linux AMI. I want to run a simple socketio server, however whenever I stop and start the instance, the script doesn't run. When I ...
0
votes
1
answer
303
views
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 ...
0
votes
1
answer
104
views
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 = '...
2
votes
1
answer
4k
views
EC2-Image builder failed with Unable to bootstrap TOE
I am using the AWS-Ec2 image builder for the first time and I have configured the pipeline with default configs and I am trying to run a component which is amazon-owned (python-3-linux), and I get the ...
0
votes
1
answer
584
views
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 ...
0
votes
2
answers
3k
views
I lost my pem file for one of my EC2 instance. No luck in restoring the instance by replacing the authorized key in root volume of this instance
I lost my pem file. So i followed the steps given in https://www.youtube.com/watch?v=F8jXE-_hdfg to restore the instance by changing the authorized_keys in root volume. Once it attached the instance ...
1
vote
0
answers
114
views
How to check that AWS EC2 AMI requires EULA Opt-In?
There is a question that asks How to opt-in for AWS EC2 AMI from SDK?. And as I understand, it's not possible to do it. But is it possible to at least understand if AMI requires Opt-In? And if our ...
0
votes
1
answer
448
views
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 ...
0
votes
1
answer
2k
views
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 ...
0
votes
4
answers
4k
views
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 ...
1
vote
0
answers
561
views
How to execute shell script during start of the machine in AWS EC2
I have create EC2 instance(name: firstinstance) and install my application on it.
Then I have created AMI image using the above instance
Then I have created EC2 instance(name: secondinstance) from AMI ...
0
votes
1
answer
391
views
Hardening AWS EC2 Instances
I have launched and AWS ECS cluster with 4 EC2 instances with ecs optimized AMI 2 years ago, the system was working fine but due to systems hardening compliance , I need to update my ECS cluster EC2 ...
1
vote
0
answers
331
views
EC2 created from AMI reflects unchanged private IP from Original Instance
I am a newbie on AWS . I did the following:
launched an EC2 instance
SSHed the instance and installed apache web server on it
echoed the hostname (private DNS) of the EC2 instance back .
created ...
2
votes
0
answers
610
views
How can I change the default phpMyAdmin access URL for AWS EC2 running Linux AMI
I just installed MySQL and phpMyAdmin on my AWS EC2 instance running Linux AMI. I would like to find out how to change the default URL to access phpMyAdmin, which is currently /phpMyAdmin. I found an ...