Questions tagged [amazon-ec2]

1

votes
2

answer
1.3k

Views

AWS Lambda boto3: Filter Instances by Launch Time = today

I'm trying to automatically backup my EC2 instances through AWS Lambda. I used these 2 scripts and they work just fine. https://gist.github.com/bkozora/724e01903a9ad481d21e https://gist.github.com/bkozora/d4f1cf0e5cf26acdd377 But I would like to add the functionality that the scripts only delete or...
T. Moser
1

votes
2

answer
334

Views

get the Alarm object of CloudWatch using boto 2

I created an alarm and want to delete it afterward... The documentation for boto 2 doesn't show how to do that. Any help ? Thanks
Sam Gomari
1

votes
2

answer
277

Views

Crontab isn't running Laravel scheduled jobs

I've set up crontab on my AWS-EC2 instance to hit the Laravel scheduling endpoint every minute via the root account using sudo crontab-e: * * * * * php ~/htdocs/artisan schedule:run >> /dev/null 2>&1 However, despite to the cron logs showing it is indeed running every minute: Jan 26 12:02:01 ip-172-...
nomaki
1

votes
2

answer
6.2k

Views

Aws Ec2 run script program at startup

There is a method to setup an EC2 machine to execute Kafka starting script on startup? I use also java Aws SDK, so I accept both solution for a program java that run command on EC2 instance and solutions for a bash script mode that run kafka script at startup.
1

votes
1

answer
412

Views

Host Dockerized Django project on AWS

I have a Django project which is working fine on my local machine. I want to host the same on AWS, but confused on what service to use and what is the best practice to so. Do I use EC2, create a ubuntu instance on it and install Docker or use ECS ? What is the best practice to transfer my django pro...
ricky
0

votes
0

answer
5

Views

Data loss after upgrading instance type in AWS EC2

I upgraded an AWS EC2 machine 10 days ago (from t2-medium to t2-large). Again, I just upgraded today the same AWS EC2 machine (from t2-large to t2-xlarge) and after rebooting I noticed a massive loss of data (10 days of work). In fact, after changing instance type I found out it reverted to the same...
juanba1984
1

votes
1

answer
1.5k

Views

how to check awscli and compatible botocore package is installed

I am trying to learn python for aws using boto3 so I was trying to execute code given here https://boto3.readthedocs.io/en/latest/guide/s3-example-creating-buckets.html I got errors module boto3 not found so I upgraded to boto3 based on an answer here Unable to install boto3 mentioned to use pip3 in...
ss321c
1

votes
2

answer
455

Views

kubernetes not creating the ELB for ingress-nginx controller

I am trying to set up ingress-nginx-controller with type as LoadBalancer using this guide for the configuration. Couple of issues I'm observing - issue#1) It does not create and deploy a ELB onto the AWS. issue#2) The External-IP status is showing as pending for ever. $ kubectl get services -...
tanmoy
1

votes
1

answer
125

Views

Ansible aws_ec2 inventory plugin issue

I am trying to get started using Ansible and the aws_ec2 plugin. I have the following in my ./ansible.cfg file: [inventory] enable_plugins = aws_ec2 and the following in my ./inventory.yml file: plugin: aws_ec2 aws_access_key_id: ********** aws_secret_access_key: ********** regions: - us-east-2 when...
Shawn Northrop
1

votes
2

answer
43

Views

Access AWS services from Apache Nifi running on AWS

I have a Nifi instance running on an EC2 machine and I am trying to access a restricted s3 bucket. Because generating access keys manually is not recommended, I want to give the machine the proper IAM role for accessing the outside bucket. I gave the EC2 machine a role which seems to work for every...
Ethan McCue
1

votes
1

answer
24

Views

Is it possible in AWS to subscribe to EC2 created/started/stopped/terminated events?

I have a utility in Lambda which does automatic DNS registration via an intelligent automated process. Instances that are created with a Name tag including XXXXXX and a autodns tag set to true will have Route 53 records created and deleted when these instances are created and deleted. Previously, I...
Naftuli Kay
1

votes
1

answer
1k

Views

Installing npm canvas on elasticbeanstalk - npm install error

I am trying to deploy a node.js server running on EC2 via Elasticbeanstalk. The problem I am having is during the rebuild of the canvas npm module. The command '[email protected] install: node-gyp rebuild' fails as follows: > [email protected] install /tmp/deployment/application/node_modules/canvas > node-gyp...
Ali Parr
0

votes
0

answer
3

Views

How can I automatically spin up my ec2 instance, run a command and then shut it down?

I want to run a machine learning model on my data in redshift postgres database once a week. I set up my R script as a rest api using plumbr and then I set it up to be managed as a task by pm2. I have it so the task starts up when the ec2 instance starts up and then keeps running. All I need to do t...
goollan
1

votes
1

answer
849

Views

Is there EC2 Elastic IP that is public facing? without NAT?

I am hosting a SIP server in EC2 using elastic IP. However, I read that SIP server doesn't really work well if the server is not public facing (using NAT), because from what I read at AWS site, elastic IP is using 1:1 NAT. The Elastic IP address is mapped to the instance using 1:1 NAT. The instance...
user3162662
1

votes
2

answer
1.7k

Views

Change Instance type of a cluster registered ec2 instance

I have an Amazon EC2 instance which is registered to a cluster of Amazon ECS. And I want to change this instance's type from c4.large to c4.8xlarge. I'm able to change its type from c4.large to c4.8xlarge in AWS console. But after the change, I found [ERROR] Could not register module='api client'...
Brian
0

votes
1

answer
18

Views

Nginx Redirect to EC2 Instance

I had angular (version: 7) site which was deployed on S3 bucket, but for SEO purposes, recently I integrated Angular Universal. Now I moved site/frontend from S3 bucket to EC2 instance. I am trying to deploy my angular universal application on Nginx (version: nginx/1.14.1) on my EC2 instance (CentO...
Junaid
1

votes
2

answer
508

Views

Which AWS services for mobile app backend?

I'm trying to figure out what AWS services I need for the mobile application I'm working on with my startup. The application we're working on should go into the app-/play-store later this year, so we need a 'best-practice' solution for our case. It must be high scaleable so if there are thousands of...
Kai Kuhlmann
0

votes
0

answer
2

Views

convert VMWare setting to EC2 instance type

I am going to launch an EC2 instance using the same/similar setting as a VMWare-based windows machine I have. the windows machine has: 2VM with 4 vCPU and 32Ram (I guess it is 4CPU and 32 RAM in total in stead of 8CPU and 64Ram in total because the window OS shows it has 4 processors and 32 RAM. Pl...
user389955
1

votes
2

answer
1.7k

Views

AWS NLB in public subnets with EC2 in private subnets

Has someone configured a NLB in the public subnets of your VPC to route traffic to EC2 instances that are in the private subnets? When using an ELB, a good solution is to create a Security Group for the ELB and then create another SecurityGroup for the private EC2 Instances, allowing incoming traffi...
Luis
1

votes
1

answer
124

Views

AWS EC2 metadata for security credentials gives empty response

I've created an ec2 and assigned ec2 full access role in the launch step. The following image shows the confirmation output in the ec2 console. When I try to retrive the aws security credentails via the metadata im getting an empty response. curl http://169.254.169.254/latest/meta-data/iam/security-...
1

votes
1

answer
95

Views

Creating default VPC using boto3?

Is there a way to do an equivalent of aws ec2 create-default-vpc using boto3? (more generally, I'm wondering if there is a way to figure out boto3/botocore equivalent of aws CLI directive)
Yaroslav Bulatov
1

votes
2

answer
1.5k

Views

How to install amazon-linux-extras

I wanna create docker image for Amazon ECR. but yum can't find it in my Amazon Linux2. [[email protected]*** ~]# yum install -y docker Loaded plugins: amazon-id, rhui-lb, search-disabled-repos No package docker available. Error: Nothing to do Next, I tried to use amazon-linux-extras. but amazon-linux-extras is...
isexxx
1

votes
1

answer
47

Views

How to know if my instance will be terminated in ec2?

I have a autoscalling in AWS, that basically do: Run a python process script.py This script get messages from sqs queue to process My autoscalling is configured to start/terminate instance based on # of avaliables messages in queue. But sometimes when i processing something in machines and my # of m...
Gaspar
1

votes
1

answer
33

Views

How does the hourly price in AWS works when building an API?

We're building a Python-based web application that has a low usage (10 hits per month max), but needs high processing power. So we thought AWS hourly cost would only charge us for when the API gets pinged, but is it really how it works? Or we will pretty much have to pay for it 24 hours in order for...
Mojimi
0

votes
1

answer
15

Views

AWS EC2 Ubuntu16.04 crontab not working at specified time

As titled, i have read through a lot different online resources, but still not be able to make crontab work at specified time, it only works when the the job is specified for every minute. p.s I have changed the timezone to Asia/Hong_Kong via dpkg-reconfigure tzdata, Also $TZ=Asia/Hong_Kong I have t...
Edison Lo
0

votes
0

answer
12

Views

AWS Ubuntu java.lang.ClassNotFoundException: Jama.Matrix

I am trying to run a mutation clustering algorithm described in https://tinyheero.github.io/2015/08/26/TrAp.html Running java -jar TrApWithDependencies.jar --text figure1.txt works fine on my laptop running windows 10, but not on AWS ubuntu. I would like to run it on my AWS instance because the algo...
DottedGlass
1

votes
2

answer
387

Views

AWS Elastic Beanstalk: Steps to move existing RDS from db.t1.micro to db.t2.small

I'm new to AWS and having a web server environment on elastic beanstalk with EC2 (t1.micro) with RDS (db.t1.micro). Now the db.t1.micro instance is deprecated, no more new instance can be created and no support in near future. I would be helpful if anybody refers me steps to do create the t2 clone o...
Saravana
1

votes
3

answer
396

Views

Is it “okay” to host a small wordpress blog on one AWS EC2 Instance without load balancers/beanstalk?

This is a very simple question for those with the knowledge, but I'm a newbie. In essence, I just need to know if it would be considered okay to run a small, approx. 700 visitors/day bitnami wordpress blog on just one t2.medium EC2 instance (without any auto-scaling, beanstalk). Am at risk of it cra...
Scotchnowplease
1

votes
0

answer
32

Views

No GPU memory when inferencing with Tensorflow

I'm inferencing one image on a just-started EC2 instance (G2) with Tensorflow. But saw the following error: I'm not sure if it's a GPU or Tensorflow setup issue because the instance has been stopped for a while and I just started it. The memory shouldn't be a problem. Please help me diagnose it. Tha...
Yuli
1

votes
1

answer
18

Views

EC2 ubuntu : unable to access site from browser but able to access from EC2 ubuntu terminal

Below is my virtual host setup ServerAdmin ******.com ServerName ***.***.com ServerAlias www.***.***.com DocumentRoot /var/www/***.***.com/public_html Options Indexes FollowSymLinks AllowOverride All Required all granted When I do curl http://***.***.com/ from ec2 ubuntu terminal,it is printing the...
RIYAJ KHAN
1

votes
1

answer
253

Views

Elastic Beanstalk went to invalid state with t1

The Elastic Beanstalk environment is running on t1.micro & db.t1.micro, where we tried to update the rds to db.m1.small instance. This configuration change has been made on the Elastic Beanstalk and it is on updating state for around 4 hours, we thought AWS stuck somewhere internally. In this meanti...
Saravana
1

votes
0

answer
32

Views

managing stored file permissions on ec2 instance

I have a laravel 5.5 app deployed to an ec2 instance managed by elasticbeanstalk. One of the app's functions involve taking a form-uploaded zip archive of course documents, unzipping the archive, and storing the files in storage/app/public. public function updateCourseFolder($file) { $folderName = e...
sitrick2
1

votes
1

answer
371

Views

Python-Selenium-Chromedriver gives ConnectionResetError on AWS-EC2 Ubuntu

I have an application using Selenium/Chromedriver, running chrome headlessly. On my local machine, it works perfectly. When trying to run on an AWS-EC2 instance of Ubuntu 16.04, I get an error each time; ConnectionResetError: [Errno 104] Connection reset by peer The outbound rules for the security...
SteveJ
1

votes
0

answer
222

Views

SSH Connect to AWS EC2 failed after using lets-encrypt update my website

Yesterday, I updated my Django website (on AWS EC2) to HTTPS by using lets-encrypt. Everything works well. The website has HTTPS green icon as expected. Today when I try to connect my instance by using SSH. The connection keep hunging. Finally, It give some message like 'ssh: connect to host ec2-34-...
Jeffery
1

votes
1

answer
78

Views

Route 53: Redirecting to EC2 + application context

So I've registered a domain name www.abc.com that points to my EC2 instance 1.2.3.4 On this EC2 instance I've a Tomcat application called my-application. I can access the application via invoking http://1.2.3.4/my-application I've configured www.abc.com to point to 1.2.3.4 But now how do I configure...
DJ180
1

votes
1

answer
348

Views

Finding public IP addresses of all EC2 instances in a ECS cluster

I try to find public IP addresses of all EC2 instances within a ECS cluster. I can see EC2 instances id's with command: aws ecs list-container-instances --cluster myCluster But this won't show IP addresses. I searched ECS CLI documentation but I can't find a command to retrieve associated IP address...
JavaRed
1

votes
1

answer
393

Views

Issue running linux AWS CodeDeploy agent in non root context

I am using AWS CodeDeploy to deploy code to our AWS Amazon Linux instances. I followed this knowledge base article https://aws.amazon.com/premiumsupport/knowledge-center/codedeploy-agent-non-root-profile/ to have the agent execute in the ec2-user context instead of root Before making the change, the...
Ryan Abrahamson
1

votes
0

answer
27

Views

Password protect a site on Amazon EC2?

I have a prototyped web app that I need to deploy. However I don't want everyone to be able to see it, I need access to be password protected. Additionally I haven't yet properly secured the back-end. If I host with Amazon EC2 is it possible to password protect access to a website? If so, then will...
Evanss
1

votes
0

answer
70

Views

My python script is consuming twice the amount of cpu credits per hour on t2.medium compared to t2.small

I have a python script that runs a single process with ~150 threads. On Ubuntu Server 16.04 t2.small instance type it runs at around 30% CPUUtilization. Since it has to run constantly at that rate and the baseline performance of t2.small is 20%, I decided to move to t2.medium (whose baseline perform...
Lyuben Laskin
1

votes
0

answer
254

Views

Cannot load the stats for bootstrap-vue – please try again later

I'm trying to use the npm to install the bootstrap-vue in my project. However, I get an error saying '[server error] Cannot load the stats for bootstrap-vue – please try again later'. I've tried to use install it manually and yarn. Neither of them work for me. The OS is ubuntu and it's running on...
Juneyee

View additional questions