Questions tagged [amazon-ec2]

Amazon Elastic Compute Cloud (EC2) provides self-service, on-demand, pay-for-what-you-use computing infrastructure resources.

Filter by
Sorted by
Tagged with
23 votes
8 answers
38k views

Where is log output from cloud-init stored?

Where does output from cloud-init (automatically runs scripts when starting up a virtual machine in the cloud, for example at Amazon EC2) go? I would like to know that my initialization scripts ...
1 vote
2 answers
303 views

Terminate EC2 Instance When DDoS'd, Then Launch New Instance

I'm planning on migrating my website and API to EC2 on Amazon. If one of my EC2 instances were to be DDoS'd, can I terminate the instance, then launch a new instance and update my CloudFlare DNS ...
12 votes
2 answers
6k views

Updating AWS CLI on Ubuntu 14.04

I installed awscli on my EC2 instance using apt-get install. The version is still aws-cli/1.2.9 and no longer updates if I use apt-get upgrade awscli. The latest release from what I Googled is 1.10....
0 votes
2 answers
28 views

Creating an ssh keypair for AWS Lightsail/EC2 instances doesn't work as expected

I've created a fair few SSH keypairs in my days but AWS seems to handle them differently. I'm using AWS Lightsail and it has a notion of 'default' keypairs. This is fine for the 'normal' user that AWS ...
0 votes
1 answer
4k views

Secure websocket connection to server running on EC2 fails

I have a node.js websocket server running on an EC2 instance on port 8080. Normal websocket connections (ws://) work fine but when I'm trying to make a secure connection (wss://), the websocket ...
0 votes
1 answer
195 views

Proxy error: /var/run/rpc/xmlrpc.sock (localhost) failed

I'm inheriting this old Django project hosted on an EC2 instance. It used to run on Heroku and used a Proximo proxy in front of gunicorn. Now it just runs a systemd script with the following: ...
6 votes
2 answers
8k views

Using an IP Address to Point to Amazon S3 Storage

Is there a way to get an IP address to refer to Amazon S3 Storage location? The current solution my company is thinking of going with involves setting up a EC2 server with an Elastic IP and using ...
0 votes
2 answers
51 views

Windows server spot instance shuts down randomly (status failed / bad-parameters)

I've been using AWS for decades at this point and I started using spot instances for various reasons including professional reasons such as testing software I develop, etc. I mostly use Windows Server ...
1 vote
1 answer
5k views

php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

I keep getting this error very frequent: Severity: Warning --> mysqli::real_connect(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution This issue gets resolved ...
2 votes
1 answer
600 views

How to upgrade to IPv6 for AWS EC2?

Starting yesterday, AWS is charging for IP addresses (IPv4). I would like to upgrade my EC2 instances to IPv6, but I must be missing the docs on how to do that? I can't seem to get an EC2 instance ...
41 votes
5 answers
40k views

Create an AWS HVM Linux AMI from an Existing Paravirtual Linux AMI

Is it possible to create a hardware virtual machine (HVM) AMI from an existing paravirtual (PV) AMI. My initially thought was to start a new PV instance and use the ec2-create-image command to ...
0 votes
2 answers
3k views

Change in php.ini not reflecting PHP Memory_Limit Master Value

I am trying to install a composer package for AWS S3 integration and came across the Composer Out of Memory issue. Upon checking phpinfo() I could see the loaded php configuration file is /etc/php....
0 votes
0 answers
12 views

k8s's pod in EC2 get disabled every hours

I'm running k8s on my ec2(t3.medium, not eks node) as masternode for webapp. I thought t3.medium could handle k8s, but.. my api server just not works(nginx shows 502 bad gateway) every hours and I ...
3 votes
1 answer
5k views

AWS ALB Connection Draining not Closing Connections after Deregistration Delay

I have three instances configured as targets in an ALB. Connection draining is disabled (deregistration delay set to 0 seconds). Sticky sessions are enabled for 5 minutes. I get stuck to one web ...
-3 votes
1 answer
176 views

about running an firewall on aws cloud

i am a firewall developer and i am new to the cloud. Finally, I've made an iso file of my firewall running on centos. I want to test its operability in a cloud environment. So, I want to use this ...
2 votes
1 answer
2k views

run cloud-init disk_setup module on every boot

I have an ec2 instance with an ephemeral disk. This instance goes down every night and boots up when needed. I used cloud-init to format the ephemeral disk and this works correct but only once. when ...
0 votes
0 answers
36 views

EC2 network burst credit balance

How do I know my usage of network credit balance? I have a t4g.small instance and periodically I face timeout issues on the networking services hosted there. As it stated here: An instance receives ...
0 votes
0 answers
18 views

Not able to FTPS to another server from EC2 under ALB and WAF

I'm having an issue whereby I'm not able to ftps to another server from my EC2. If I run a simple command lftp username:password@serverurl:2121 then proceed to ls, I will be stuck at ls at 0 [...
1 vote
1 answer
4k views

EC2 instance's Docker ports not not accessible after changing instance type

When changing the EC2 instance type I ran into a problem. The machine had 3 Docker containers that needed to be restarted and after the restart their ports became unreachable. What could be the ...
1 vote
3 answers
612 views

Which EBS drive attached to my Amazon EC2 instance contains root volume?

I have an Amazon EC2 instance that has two EBS drives associated with it: an 8 GB drive at /dev/sda1, and a 20 GB drive at /dev/sdf. I didn't set this up so I'm not sure why this instance needs two ...
2 votes
1 answer
8k views

AWS system manager : Verify that the IAM instance profile attached to the instance includes the required permissions

I am trying to access an ec2 instance using AWS systems manager for that I've created a role attached to the following policies. AmazonEC2RoleforSSM AmazonSSMAutomationApproverAccess ...
1 vote
3 answers
10k views

EC2 unable to ping google.com

We created new VPC that has four subnets, two private and two public. Private and public will be Mumbai A Mumbai B region. When I ping google.com from public Mumbai A it is not working. When I ping ...
0 votes
0 answers
62 views

dns problems in self managed aws ec2 cluster with aws-vpc-cni

I'm new to k8s and I've been trying to learn it. I faced a problem with trying to setup aws-vpc-k8s-cni on my fresh k8s cluster with coredns. Here's the problem in detail. Cluster & Network ...
0 votes
3 answers
163 views

Upgrade mysql 5.6 to 8 not working on AWS Linux based EC2

I am working with EC2 for MySQL DB. The OS of EC2 is AWS Linux-based Ubuntu. The current version of MySQL is 5.6.50. I am going to upgrade it to 8.0. I tried to upgrade it with this command: sudo yum ...
0 votes
2 answers
5k views

Share folders between two EC2 instances within the same VPC

I have a number of Windows servers in EC2 on the same VPC. How can I get those machines to share folders with each other? The closest answer I see is here: Unable to Share Data between Amazon EC2 ...
1 vote
1 answer
345 views

Why does WinSCP connect to /root and nothing else, through OpenSSH?

We set up an Amazon EC2 instance and managed to WinSCP into it by setting up WinSSHD on the server. As WinSSHD is commercial, we were looking for a free alternative and opted to try OpenSSH, which I ...
0 votes
0 answers
64 views

AWS EC2 Ubuntu 22.04 LTS session timeout not working (ClientAliveInterval, ClientAliveCountMax)

I installed an AWS EC2 instance using Ubuntu: ubuntu@ip-aaa-bbb-ccc-ddd:~$ lsb_release -ds Ubuntu 22.04.3 LTS I was using the following simple tutorials to set the ClientAliveInterval and ...
0 votes
0 answers
31 views

Error "The connection to the server was refused - did you specify the right host or port?"

I'm new to K8s. I'm configuring a K8s cluster on EC2 and I've started by installing docker, then started: systemclt start docker Installed kubeadm on the EC2 instance: (https://v1-28.docs.kubernetes....
0 votes
0 answers
12 views

API Errors on AWS management console

I am seeing these API Errors on the AWS management console (EC2 & VPC dashboards). Sometimes refreshing will allow it to work for a short time. This only seems to happen when accessing from our ...
7 votes
3 answers
1k views

Amazon EC2 multiple private IP addresses per instance

I have a scenario where an application requires multiple private IP addresses but does not require the resources of multiple instances. In this case, I would like to run multiple jboss instances on ...
0 votes
1 answer
19 views

Archive files in EC2 Instance

I want to create the archives of the files in EC2 instance to load them into the S3 bucket, but I am not getting a proper command to run on the AWS cli.
25 votes
2 answers
26k views

In AWS, how to check which resources are using VPC IP addresses

According to Amazon and my test, a /24 VPC subnet allows for 251 available IP addresses. I have 2 other subnets in that VPC that appear to have no IP's in use by EC2 and the available IPs field ...
0 votes
0 answers
104 views

Got read permissions but not write permissions in aws SFTP in EC2

I'm a bit new to aws and especially SFTP but I'm trying to set up an EC2 instance with SFTP so I can access it with FileZilla and I've set it up and can copy files from it into my own directories but ...
0 votes
1 answer
27 views

How to add assignments to EC2 host /etc/fstab when identifiers are not unique?

I have volumes connected to an AWS EC2 instance running Linux and would like one of them to be mounted as root / on reboot. One option is to put the device UUID into the host's /etc/fstab entry. ...
0 votes
1 answer
39 views

No SSH access to EC2 instance launched by ASG, while I can access an otherwise identical instance

I'm trying to SSH to an EC2 instance that's part of an ASG associated with an ECS service. To help narrow down the problem, I created new instance from the same launch template. I've carefully ...
2 votes
1 answer
5k views

AWS EC2, Apache, PHP: php_network_getaddresses: getaddrinfo failed

Running PHP 5.6 on an EC2 instance with Apache 2.4.18, I'm occasionally seeing errors in the log when trying to connect to an RDS database: PDO::__construct(): php_network_getaddresses: getaddrinfo ...
0 votes
0 answers
83 views

EC2 micro instance randomly uses 100% of CPU and stays there

I am running a node.js service and a docker postgres image on an EC2 micro instance. Usually it runs fine for weeks / months but randomly the instance goes up to 100% CPU usage and stays there, ...
2 votes
1 answer
4k views

This site can’t provide a secure connection when deploying node app on aws ec2

i have simple nodejs app running on ec2 instance, when tried to access the app from browser using "ec2-18-223-0-201.us-east-2.compute.amazonaws.com:4545 refused to connect." it give me This site can’...
0 votes
2 answers
236 views

Optimizing PHP-FPM Configuration for WordPress on Bitnami EC2 t3a.medium instance

I'm running a WordPress website on an AWS EC2 t3a.medium (4Gb Ram) instance using Bitnami. The server's RAM often gets completely filled, causing the server to crash and I need to restart it from ec2 ...
0 votes
1 answer
798 views

AWS EC2 ssh: connect to host, port 22: Operation timed out, nothing has changed?

I'm sure a number of you were seeing red and ready to hit that downvote button as soon as you saw this question popping up again. It really does pain me to be asking a question that was seemingly ...
1 vote
1 answer
302 views

what does 'AVC avc: denied { name_connect }' mean, and how do i prevent it?

i had an Amazon Linux 2023 web server that had been running normally for weeks now. this morning, it became inexplicably unresponsive for about two hours before (inexplicably!) recovering. according ...
0 votes
3 answers
1k views

Deleted my Home folder now I cant remotely connect via SSH

I accidentally deleted the Home directory with sudo rm -r ~, when I try reconnecting the ssh returns ssh -v key.pem ec2-user@PublicIP-address ec2-user@PublicIP-address: Permission denied (publickey,...
0 votes
1 answer
81 views

How to create a VPC endpoint to access SQL DB hosted inside EC2 instance?

I have a lambda in VPC-1 trying to access a SQL database which is hosted inside an EC2 instance in VPC-2. How should I establish a connection between Lambda(VPC-1) and SQL DB (VPC-2) using VPC ...
1 vote
0 answers
117 views

Can no longer SSH to my AWS EC2 instance - Operation timed out error

I am using the following command to SSH into my AWS EC2 server and this has been working fine for some time, however recently it hangs and then times out. ssh -i "ec2-pro-clubs-server.pem" ...
2 votes
1 answer
9k views

How to increase timeout of EC2 instance for http request

We are getting 504 timedout issue whenever the response time exceeds 60s. EC2 instance is timed out in 60 second. Is there any way to to increase the time-out time configuration in EC2 instance? We ...
1 vote
1 answer
115 views

Accessing RDS or EC2 instance without '.pem' key

I am working for a charity who has a few of their services on AWS. They hired an agency years ago to spin up these intranet and tools platforms. I am trying to get a dump of their db, for backup ...
2 votes
1 answer
85 views

What are the differences between the migration options for Elastic Beanstalk Multi-container Docker environments to AL2?

We're running an Elastic Beanstalk Multi-container Docker environment on Amazon Linux 1, which has been deprecated and needs to be migrated to Amazon Linux 2. The documentation presents two options ...
1 vote
2 answers
6k views

Amazon EC2 ubuntu instance ifconfig does not show interfaces attached by attach_network_interface

I have launched a c3.xlarge ubuntu instance in a VPC. This instance supports 4 interfaces. I use ec2 python APIs to create_network_interface and attach_network_interface to add eth1, eth2, and eth3. ...
0 votes
0 answers
25 views

AWS Automatic IAM Roles for Service Users

I have an EC2 instance that has an assigned/assumed role. When I run: aws sts get-caller-identity as the main login user or with sudo it returns the account information expected. However, I have a ...
0 votes
1 answer
183 views

Routing traffic between newly established S2S VPN between AWS and Azure

I am trying to establish a site-to-site VPN connection between AWS and Azure to connect some VMs together. I followed a set of instructions from Microsoft and have successfully connected an Azure ...

1
2 3 4 5
132