Questions tagged with Amazon EC2
Content language: English
Sort by most recent
Has anyone ever recovered a randomly-assigned non-Elastic IP address?
I had a terrible thing happen this evening. One of my EC2 instances that had a randomly-assigned non-Elastic IP address was retired due to a hardware issue, and therefore I lost access to that IP address. Unfortunately that IP was a critical IP to my organization. I run an email platform and that IP was used in our customers' email campaigns to track link clicks. I should have never architected it this way -- my mistake -- but I'm now pleading with AWS support to give me that IP back. Wondering if anyone has ever been in a similar situation and gotten this resolved.
SSH connection from my local terminal to EC2 ubuntu instance is timed out.
Hello, I created an EC2 ubuntu instance and connect that instance through SSH from my local command prompt and connection was successfully. After sometime i close my terminal, reopen my local terminal again and try to connect the same instance but this time it gives timed out error. if i create new instance and connect to it it connects successfully. Mean each instance is connected through ssh connection only once. if i close connection and try to reconnect it gives timed out error. I set the security rule to permit SSH connection from anywhere. Can you please help me in this regard thank you.
Debian-11 build process has lost its ethernet interfaces
We are using Yocto build-system (kirkstone) to compile images for i.MX8 based development board and we are trying to move the build process to AWS EC2 based environment for CI integration. We are currently using Debian (AMI: debian-11-amd64-20220503-998, type: t3.2xlarge) EC2 image from AWS marketplace. We have configured the EC2 machine with one external interface that binds to public IP and the machine is able to communicate with the outside world. This is the output of the `ip addr` from the login shell ``` admin@ip-XXX-XXX-XXX-XXX:~$ ip a show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000 link/ether XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff altname enp0s5 inet XXX-XXX-XXX-XXX/20 brd XXX.XXX.XXX.XXX scope global dynamic ens5 valid_lft 2992sec preferred_lft 2992sec inet6 XXXX::XXXX:XXXX:XXXX:XXXX/64 scope link valid_lft forever preferred_lft forever ``` But, after we try to compile our Yocto project we get several build errors due to fetch failing as some of our recipes fail to fetch sources from outside world. If I launch a development shell with `bitbake -c devshell my-app` it will no longer see the ethernet devices but only the local interface which is in down state and has no IP attached to it ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ ip a show 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:200:00:00:00 ``` and I can also see that resolving outside connections no longer work ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ traceroute6 www.google.com www.google.com: Temporary failure in name resolution Cannot handle "host" cmdline arg `www.google.com' on position 1 (argc 1) ``` This is the output from process tree ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ ps f PID TTY STAT TIME COMMAND 943 pts/1 Ss 0:00 /bin/bash 994 pts/1 R+ 0:00 \_ ps f 758 pts/0 Ss 0:00 -bash 830 pts/0 Sl+ 0:01 \_ python3 /home/admin/yocto/sources/poky/bitbake/bin/bitbake my-app -c devshell 941 pts/0 S+ 0:00 \_ sh -c screen -r devshell_939 942 pts/0 S+ 0:00 \_ screen -r devshell_939 ``` Another thing that seems off is that the build process has somehow lost all its groups and there is a group `nogroup` added ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ groups admin nogroup ``` When running the `groups` from the login shell the user has `admin adm dialout cdrom floppy sudo audio dip video plugdev netdev` that seem to be lost when launching the development shell. We are using the build system in multiple local development environments (based on Debian-11) and the build system is able to connect to outside world just fine so this relates to the AWS EC2 Debian image that we are using. Why are the interfaces not displayed and how can we work-around this issue so that the build process can access the source repositories from the build environment?
VirtualBox localhost "Login incorrect"
I am new to virtual machines, Linux and amazon so please bare with me. I have installed the virtual machine according to amazon's instructions listed [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html). I am able to boot in VirtualBox, but I am stuck on a sign in page that asks for: ``` localhost login: ``` rather than: ``` amazon login: ``` as I've seen others report. Now I have not made changes to the *meta-data *file in the ISO image, so all it says is: ``` local-hostname: amazon ``` with some additional commented lines regarding 'network-interfaces' that I am unfamiliar with. The server goes to "localhost" as a direct result of this, I guess? but I do not know the login for localhost and the users and passwords set in the *user-data* file do not work. If someone could point me in the right direction to set the proper network configuration or help with the credentials that would be greatly appreciated.
Not able to detach EBS Volume
Although the EBS volume is not attached to any EC2 instsances, it is still showing in-use. I tried force detach from aws console but it is stuck. Force detaching the volume from AWS CLI shows following error ``` An error occurred (InvalidParameterValue) when calling the DetachVolume operation: The volume ID 'vol-00402f84342cf78f' is malformed ```
Got regional data transfer usage between Lightsail and EC2 within the same region
Hi: I'm using VPC peering to connect my EC2 and Lightsail instance within the same region and AZ. The EC2 has no public IP address, but from the usage report, I found the EC2 somehow has regional data transfer usage with public IP. VPC log also shows no transfer to anywhere outside of the AZ, is there any possibility that some other AWS service could cause this issue? Thanks. ![EC2 instance](/media/postImages/original/IMXLRIKkwASqOyT388Y9FLjw) ![usage](/media/postImages/original/IM2oit7osLRSK_qpSjDEDM4A)
Launching EC2 instance failed in Auto Scaling Group
I have an autoscaling group, recently change to attribute based selection, and now have many errors: > Launching a new EC2 instance. Status Reason: Internal error. Launching EC2 instance failed. during attempts scale-outs. I can't find any more detail as to what the error is.
Show only selected servers in session manager
Hi, I am currently using session manager to provide access to all servers via session manager which is working as intended. The issue comes where I got another set of users who require access to certain servers. Is there anyway, only the servers that is required will be shown up in the session manager. I tried to edit the ec2:DescribeInstances but I just can't get it working. Would require assistance with this.
Host a python django website in aws in free tier
I'm a newbie to AWS. I have developed a python django website of size 5GB. I'm planning to launch it via AWS Ec2 instance by adding ads in the site. I created an ec2 instance by choosing t3.micro and a db- rds instance by selecting mysql. So this db instance went beyond 20GB limit in a day which i have no idea. i did just created the db instance. So this ec2 instance will have project folder of size 5GB and DB rds instance will have a user table which will be used on signup of the user and during login of the user. Only two scenarios. How to choose ec2 instance type and DB rds instance storage to stay in free tier?
How can i check files and data stored in EBS volume
Hello members, I am running ec2 instance with 20 GB ebs volume. Actually still i have not stored any files in ebs volume using cpanel but when i am visiting billing dahsboard it showing me 14 GB usage of EBS volume so can anyone tell me where this storage would be used and how can i see its data?
Nginx setup in ec2 windows server
Hi, In ec2 windows server i had installed nginx instead of IIS. hosted in public subnet,Nginx folder i kept in C drive. In target group its showing Unhealthy. when i run localhost in the server i can see nginx page but from from loadbalancer its unable to access that. How to reslove this issue?