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
117
votes
8 answers

Amazon AWS Filezilla transfer permission denied

I have my instance of the Amazon AWS running, test page is up. I am trying to SFTP the files to the server to display my website. I have Filezilla connected to the AWS server but when I try to move the files from my local machine to the…
zburns12
  • 1,783
  • 3
  • 15
  • 16
116
votes
13 answers

How to convert Linux cron jobs to "the Amazon way"?

For better or worse, we have migrated our whole LAMP web application from dedicated machines to the cloud (Amazon EC2 machines). It's going great so far but the way we do crons is sub-optimal. I have a Amazon-specific question about how to best…
Tom
  • 14,041
  • 16
  • 64
  • 80
115
votes
4 answers

How to link godaddy domain with AWS Elastic Beanstalk environment?

I'm running into this problem trying to link my Godaddy domain with an AWS Elastic Beanstalk instance. I found a lot of documentation on how to link an EC2 instance with a domain on Godaddy but not for Elastic Beanstalk instance. So I ended up with…
Bob Bill
  • 1,159
  • 2
  • 8
  • 3
114
votes
10 answers

AWS EC2 Auto Scaling Groups: I get Min and Max, but what's Desired instances limit for?

When you setup an Auto Scaling groups in AWS EC2 Min and Max bounds seem to make sense: The minimum number of instances to scale down to based on policies The maximum number of instances to scale up to based on policies However, I've never been…
Ray
  • 40,256
  • 21
  • 101
  • 138
114
votes
6 answers

Powershell - Why is Using Invoke-WebRequest Much Slower Than a Browser Download?

I use Powershell's Invoke-WebRequest method to download a file from Amazon S3 to my Windows EC2 instance. If I download the file using Chrome, I am able to download a 200 MB file in 5 seconds. The same download in PowerShell using Invoke-WebRequest…
Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248
111
votes
5 answers

What happens when I reboot an EC2 instance?

When I reboot an EC2 instance, do I get the initial image again, or is the state of the hard disk before the reboot kept? And what happens with billing, does the hour start again, or do I continue with the fraction of the hour I was in when I…
flybywire
  • 261,858
  • 191
  • 397
  • 503
109
votes
11 answers

How to verify JWT from AWS Cognito in the API backend?

I'm building a system consisting of an Angular2 single page app and a REST API running on ECS. The API runs on .Net/Nancy, but that might well change. I would like to give Cognito a try and this is how I imagined the authentication workflow: SPA…
EagleBeak
  • 6,939
  • 8
  • 31
  • 47
109
votes
6 answers

Get Public IP Address on current EC2 Instance

Using Amazon CLI, is there a way to get the public ip address of the current EC2? I'm just looking for the single string value, so not the json response describe-addresses returns.
obautista
  • 3,517
  • 13
  • 48
  • 83
109
votes
8 answers

How can I use Spring Security without sessions?

I am building a web application with Spring Security that will live on Amazon EC2 and use Amazon's Elastic Load Balancers. Unfortunately, ELB does not support sticky sessions, so I need to ensure my application works properly without sessions. So…
Jarrod Carlson
  • 1,967
  • 4
  • 16
  • 20
108
votes
7 answers

Proper access policy for Amazon Elastic Search Cluster

I've recently started using the new Amazon Elasticsearch Service and I can't seem to figure out the access policy I need so that I can only access the services from my EC2 instances that have a specific IAM role assigned to them. Here's an example…
100
votes
5 answers

GLIBC_2.27 not found while installing Node on Amazon EC2 instance

I'm trying to install Nodejs on Amazon linux machine, I'm following this documentation to install node https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html but I'm getting below error when I execute…
Brady Maf
  • 1,279
  • 2
  • 5
  • 12
100
votes
5 answers

Self-Terminating AWS EC2 Instance?

Is there a way that Amazon Web Services EC2 instances can be self terminating? Does Amazon have anything that allows an instance to terminate itself ("Hara-Kiri") after running for more than say an hour? I could change the scripts on the running…
Steve3p0
  • 2,332
  • 5
  • 22
  • 30
99
votes
13 answers

Installing PostgreSQL Client v10 on AWS Amazon Linux (EC2) AMI

I have successfully launched new AWS RDS PostgreSQL v10 instance and need to install PostgreSQL v10 client on Amazon Linux EC2 instance. I have tried to install it with yum, but it cant find the package for v10: [ec2-user@ip-X-X-X-X ~]$ sudo yum…
Ismar Slomic
  • 5,315
  • 6
  • 44
  • 63
98
votes
4 answers

How to add SSL certificate to AWS EC2 with the help of new AWS Certificate Manager service

AWS has come up with a new service AWS Certificate Manager. One thing I got from the description is that if we are using this service we don't have to pay for the certificate anymore. They are providing certificates for Elastic Load Balancer (ELB)…
Bhavik Joshi
  • 2,557
  • 6
  • 24
  • 48
97
votes
8 answers

Node.js app can't run on port 80 even though there's no other process blocking the port

I'm running an instance of Debian on Amazon EC2 with Node.js installed. If I run the code below: http = require('http'); http.createServer(function (request, response){ response.writeHead(200, {'Content-Type':'text/plain'}); response.end('Hello…
Brian Yeh
  • 3,119
  • 3
  • 26
  • 40