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
9
votes
2 answers

How to install sqlite3 gem on EC2?

When I tried to: sudo yum install ruby-devel sqlite3-devel Amazon EC2 returns: Loaded plugins: fastestmirror, priorities, security Loading mirror speeds from cached hostfile Setting up Install Process Package…
ohho
  • 50,879
  • 75
  • 256
  • 383
9
votes
0 answers

SSH Tunnel - channel 2: open failed: administratively prohibited - Ubuntu 18.4 VM

I need to run an android project from a remote location to the Appetize.io simulators. The simulator provides an ssh command to do it. Every time I tried to connect, it outputs the following error: Appetize command to connect through SSH sudo ssh…
Ruben A. Chevez
  • 327
  • 4
  • 9
9
votes
0 answers

Is fs.file-max and ulimit nofile in AWS ECS limited by the EC2's fs.file-max and nofile?

I am attempting to run a few load tests on Nginx running on ECS and I have set the ulimit to a higher value (777001) via the task definition as mentioned in the documentation. Inside the container, the ulimit -Hn command and cat…
9
votes
3 answers

Keep same IP address for EC2 Instance

Do EC2 instances change the IP address for your instance each time you stop/start the instance? Is there a way to keep the IP address constant?
user1154644
  • 4,491
  • 16
  • 59
  • 102
9
votes
3 answers

AWS Lambda vs EC2: Which one to choose

I am trying to make login service which is deployed on EC22 to serverless. But I am not sure if AWS Lambda or serverless exposed via AWS API Gateway is right fit for login use cases where after successful log in it would return accesstoken. That's…
9
votes
3 answers

Configure keep-alive for EC2 instance

I have a Django app running on a python instance with Nginx as the webserver. I'm getting a 60 second timeout for one of my operations. According to the docs, you want to increase the load balancer's idle timeout above the default 60 seconds…
AlxVallejo
  • 3,066
  • 6
  • 50
  • 74
9
votes
3 answers

Communication between PHP web app server layers on Amazon Web Services

I'm looking into developing a web application hosted on Amazon Web Services and I have a question regarding it's architecture. Looking at the diagram below from Amazon, they've got 3 layers; a web server serving users via HTTP, an application server…
Steve
  • 2,526
  • 2
  • 20
  • 30
9
votes
1 answer

Service segmentation fault in AWS EC2

I have my service running in EC2 (under systemd). It is a self-contained app built for .Net Core 2.1. From time to time (a few times a week) it crashes with SEGV. Apr 30 21:20:51 ip-10-4-226-55 kernel: traps: App.Name[26176] general protection…
9
votes
4 answers

Unable to unzip .zip file on linux machine

I have a large ~10GB zip file that was created using the standard Windows method (right click, select "send to compressed (zipped) folder"). I am able to unzip it just file on my Macbook. I'm trying to unzip it on an EC2 machine. I know the file is…
TomBomb
  • 3,236
  • 5
  • 31
  • 40
9
votes
3 answers

Environment Variables not loading to process.env in Nodejs

I'm building out a nodejs api and have setup the dotenv package as a dev dependency to load the variables to process.env on developer's local machines. Note that when I log in I use sudo -i to operate as root. My intent is that during deployment,…
C Bauer
  • 5,003
  • 4
  • 33
  • 62
9
votes
1 answer

Using CloudFront with a single EC2 instance without a load balancer

I recently migrated my WordPress to an EC2 instance. I attached an Elastic IP address to it and created an A record in my Route 53. But all my requests were HTTP so I wanted to use CloudFront to redirect all my HTTP to https. I created a CloudFront…
9
votes
3 answers

Django TemplateDoesNotExist at / debug_toolbar/base.html after deployiing to EC2

I am trying to deploy a Django app on EC2 Instance. I had put my EC2 instance in the Allowed_Host correctly. but it kept giving me a Disallowed_Host error. I have been trying to fix that but Now I get the. Django TemplateDoesNotExist at / …
Samir Tendulkar
  • 1,151
  • 3
  • 19
  • 47
9
votes
1 answer

How to mask IP in AWS cloud watch in AWS ELB via AWS cli by custom header?

Is there any way to configure AWS loadbalancer via AWS cli to put predefine text like na in place of IP? Example data log https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html#access-log-entry-examples
Ramratan Gupta
  • 1,056
  • 3
  • 17
  • 39
9
votes
3 answers

Simple IAM Issue with CodeDeploy

I'm having an issue with a seemingly trivial task of getting CodeDeploy to deploy Github code to an AutoScaling Group in a Blue/Green Deployment. I have a Pipeline setup, a Deployment Group setup, and the AutoScaling Group, but it fails when it gets…
9
votes
4 answers

Does Google Cloud provide public hostnames for their Compute instances?

Does Google Cloud provide public hostnames for their Compute instances? AWS seems to generate public hostnames for their EC2 instances: A public (external) DNS hostname takes the form ec2-public-ipv4-address.compute-1.amazonaws.com for the…