Questions tagged [amazon-ec2]

Amazon EC2 stands for "Amazon Elastic Compute Cloud". It is a part of Amazon Web Services (AWS) and allows users to rent virtual machine instances. You can create instances, launch and manage them through a central interface, through a web API or through a console.

Amazon EC2 is a part of Amazon Web Services (AWS) and allows users to rent virtual machine instances. You can create instances, launch and manage them through a central interface, through a web API, through a console, or by using an Infrastructure as Code tool like terraform

Generally, EC2-related questions on StackOverflow should be about the EC2 API or other programming-oriented topics. Questions about EC2 networking, OS-level issues, cost, etc. should be asked on ServerFault instead.

Resource

  1. Instance types
  2. Pricing
  3. Documentation
  4. Discussion Forum
36510 questions
63
votes
9 answers

WordPress on EC2 Requires FTP Credentials to Install Plugins

I just installed WordPress 3.5.2 on an Amazon Linux AMI EC2 micro instance. When I tried to install the wp-db-backup plugin (Plugins -> Add New), I was prompted for a Hostname, FTP Username, FTP Password and Connection Type. The answer to this…
Anthony
  • 3,990
  • 23
  • 68
  • 94
62
votes
5 answers

AWS - What are the exact differences between EC2, Beanstalk and LightSail?

What are the exact differences between EC2, Beanstalk and LightSail in AWS? What are good real time scenarios in which I should use these services?
62
votes
4 answers

How to see what profile is default with CLI?

Given I have the following config file: [default] aws_access_key_id=default_access_key aws_secret_access_key=default_secret_key [profile testing] aws_access_key_id=testing_access_key aws_secret_access_key=testing_secret_key region=us-west-2 And…
Green
  • 28,742
  • 61
  • 158
  • 247
62
votes
11 answers

Attaching and mounting existing EBS volume to EC2 instance filesystem issue

I had some unknown issue with my old EC2 instance so that I can't ssh into it anymore. Therefore I'm attempting to create a new EBS volume from a snapshot of the old volume and mount it into the new instance. Here is exactly what I did: Created a…
Gabriel Rebello
  • 1,077
  • 1
  • 11
  • 17
62
votes
9 answers

How to transfer files between AWS s3 and AWS ec2

I am using AWS ec2 instance. On this instance I'm resulting some files. These operations are done by user data. Now I want to store those files on s3 by writing code in user data itself. So how can I store those files on s3? Have any tutorials on…
Pravin
  • 2,871
  • 5
  • 26
  • 29
62
votes
6 answers

Should I use Amazon's AWS Virtual Private Cloud (VPC)

Currently moving to Amazon EC2 from another VPS provider. We have your typical web server / database server needs. Web servers in front of our database servers. Database servers are not directly accessible from the Internet. I am wondering if there…
spicer
  • 905
  • 1
  • 8
  • 9
61
votes
8 answers

How to auto start web services when starting an Amazon EC2 instance?

How do I set the httpd and mysqld services to start automatically upon booting an amazon-ec2 instance? Currently I have to start them manually by connecting to the instance via ssh and running sudo service httpd start and sudo service mysqld start.
user655334
  • 965
  • 3
  • 15
  • 27
61
votes
7 answers

Locked myself out of SSH with UFW in EC2 AWS

I have an EC2 Instance with Ubuntu. I used sudo ufw enable and after only allow the mongodb port sudo ufw allow 27017 When the ssh connection broke, I can´t reconnect
61
votes
12 answers

ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI

I am trying to publish my site on an Amazon's EC2 Instance, and I keep getting a 500 error. I really don't know why. //Log Files [Sun Feb 17 23:12:48.066802 2013] mod_wsgi (pid=2102): Target WSGI script '/srv/www/app/poka/apache/wsgi.py' cannot…
abisson
  • 4,365
  • 9
  • 46
  • 68
60
votes
8 answers

EC2 instance on Amazon and I am greeted with "No space left on the disk"

I have installed Amazon EC2 fedora instance and copying the files from one location to another. But I am greeted with " No space left on the disk". I did df -f. with output: Filesystem Size Used Avail Use% Mounted on /dev/sda1 …
onkar
  • 1,149
  • 4
  • 12
  • 14
60
votes
7 answers

How to fix WordPress HTTPS issues when behind an Amazon Load Balancer?

I've had this issue before. When running WordPress (or other PHP scripts) behind Amazon's EC2 Load Balancer, the scripts do not realize they are being ran on the https:// protocol and results in issues such as endless redirect loops, and HTTPS…
A.B. Carroll
  • 2,404
  • 2
  • 17
  • 19
60
votes
7 answers

Does it make sense to have an Amazon Elastic Load Balancer with just one EC2 instance?

My question is simple. Does it make sense to have an Amazon Elastic Load Balancer (ELB) with just one EC2 instance? If I understood right, ELB will switch traffic between EC2 instances. However, I have just one EC2 instance. So, does it make…
Rober
  • 5,868
  • 17
  • 58
  • 110
60
votes
4 answers

Is using a load balancer with ElasticSearch unnecessary?

I have a cluster of 3 ElasticSearch nodes running on AWS EC2. These nodes are setup using OpsWorks/Chef. My intent is to design this cluster to be very resilient and elastic (nodes can come in and out when needed). From everything I've read about…
user2719100
  • 1,704
  • 3
  • 20
  • 25
60
votes
8 answers

How to get Elastic Beanstalk nginx-backed proxy server to auto-redirect from HTTP to HTTPS?

I've got a Node.js powered site that I'm running on Amazon Elastic Beanstalk. My Node.js app listens on port 8080, and I'm using the nginx elastic load balancer configuration with my EB app, listening on port 80 and 443 for HTTP and HTTPS. However,…
60
votes
5 answers

How can I move EC2 instances to a different subnet?

I have a VPC set up in AWS. we have created 2 subnets (A/24 and B/24), straight using all the IP having no IP's/Subnets for further usage. We find that the b/24 is not totally utilized and we are wasting the Ip address in that. Now we want to reduce…
Pasha
  • 798
  • 1
  • 5
  • 9