Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [amazon-ec2]

For questions about using Amazon Elastic Compute Cloud in DevOps, including deploying, monitoring and scaling applications in EC2. For questions specifically about monitoring EC2 with [aws-cloudwatch] use that tag. For the EC2 container service use the [amazon-ecs] tag.

0
votes
1answer
13 views

How can I access the console of a booting EC2 instance in AWS?

I'm new to AWS and am looking for a way to access my EC2's console so I can triage issues such: boot to single user mode view console output as system boots gain console access to debug GRUB issues
0
votes
1answer
15 views

compiled opencv copy to another host

Every time I spawn a new host I need to compile OpenCV on Ubuntu following official manual. The problem is that it takes about 20-30 minutes depends on the VM type. Is it somehow possible to store the ...
1
vote
0answers
17 views

How to use ecs service dicovery

I'm trying to use amazon service discovery to register a Redis server in order to be reachable by other ECS services in the same cluster. I'm using EC2 to deploy my services not Fargate, so service ...
0
votes
0answers
14 views

Working with ConfigSets in AWS::CloudFormation::Init

I added a AWS::CloudFormation::Init section in my EC2 instance stack. The full stack is at pastebin. When the command /usr/local/bin/cfn-init -v --configsets default --stack ${AWS::StackName} --...
0
votes
1answer
18 views

What is the cheapest way to get CI for a Qt project?

To build up my portfolio I'm writing an application to showcase all the best practices I'm aware of, including unit tests and continuous integration. The project was originally started in C++, and I ...
0
votes
1answer
16 views

How to make Load balancer to wait for custom program to finish running?

I have a problem I am trying to solve. When the auto scaling creates a new EC2 instance, the load balancer gets a positive health check result fairly quickly. However, the problem is that we have a ...
3
votes
1answer
40 views

How to securely pass sensitive data to EC2 Spot instances?

Right now, we only use EC2 on-demand instances, and we provision sensitive data (credentials, private keys, etc.) on the instances' EBS which are encrypted with a KMS key. My understanding is that I ...
0
votes
0answers
7 views

GuardDuty Default severities are they static values

looking to deploy Guardduty and I not the the AWS doc have a default severity for each finding Low-Medium-High, I'm assuming these default severity map directly to: High:7.0 to 8.9 range Medium:4.0 to ...
0
votes
1answer
32 views

ansible aws windows ec2 - Internal Error: this connection module does not support running commands via sudo

I am getting below error when I am trying to run one playbook which connects to Windows machine hosted on AWS EC2. I enabled winrm and win_ping worked fine but when I am invoking ansible-playbook I am ...
0
votes
1answer
25 views

How to pass HashiCorp Vault secrets(k/v passwords) to Terraform EC2 instance

How can we pass HashiCorp Vault secrets, k/v username/password and feed Terraform while its creating Ec2 instance. For example, i don't want to use in plain text variable "myvariable" { default = "...
1
vote
1answer
219 views

How to re-enable RDP on AWS-EC2 instance

Accidentally i disabled RDP on EC2 windows machine and now I am not able to access it via RDP, Is there any way to re-enable RDP service on EC2 instance?
1
vote
0answers
22 views

How to override the user for ECS task via CLI?

I've got a Task Definition with parameters which executes a script using a regular user. I'd like to test the script without changing the Task Definition by overriding the default user which script ...
2
votes
1answer
55 views

Is containerized deployment of jenkins on ECS better than running jenkins inside EC2 instance to secure pipeline information?

I am new to AWS, docker and jenkins. I want to run a jenkins build pipeline and I have tried using following two ways on AWS: Running jenkins inside the EC2 instance following the steps at this AWS ...
0
votes
1answer
14 views

Can I check whether ansible is on last batch of rolling update (serial: 25%)?

I'm using Ansible to update a pool of EC2 servers with a rolling update, in batches of 25%. In between batches, I'm pausing long enough for the server health checks to start to pass again (since they'...
0
votes
2answers
86 views

Transfer files and execute commands from jenkins scripted pipeline to AWS instance

I want to transfer files and execute a few commands on remote AWS instance from Jenkins. I have the following methods in mind to do the same. Note that my Jenkins server is running in the local server,...
0
votes
1answer
24 views

How does Django deployments happen on Servers?

I started learning Django six months ago and I really really loved it. I learnt how to deploy the django projects to EC2 instances. Basically 1st time when the django project is deployed to EC2, ...
0
votes
0answers
18 views

How do I get Jenkins to work in a Docker container without modifying a directory on the Docker host?

I am using RHEL 7.x in AWS. I have Docker 1.13 installed. I checked a variety of ports and no firewall (or Security Group) seems to be blocking network connectivity on the EC-2 host. I tried this ...
0
votes
0answers
15 views

How to spawn on-demand cloud batches with GitLab similar to Jenkins EC2 plugin?

While you need your build agents/slaves just to execute a build, infrastructure as code allows you to get disposable build/test machines which thus require zero maintenance on demand. For example, if ...
4
votes
4answers
64 views

Digital Ocean vs AWS EC2 for Laravel based application

I'm working on a project based on Microservice architecture in Laravel, which means I'll have many small apps and Databases, I'm confused weather I should buy AWS EC2 or Digital Ocean's hosting. My ...
1
vote
1answer
31 views

Rancher, Load Balancing and own domain

I have a question about rancher. I'm running my rancher on aws. I have created a new cluster with two nodes (workers) and I have deployed my docker images. Now I wanted to add Load Balancer, but I don'...
7
votes
2answers
114 views

Best way to launch 100 identical Docker machines on AWS?

I need to do some large scale testing on a system. The system consists of 2 main parts: Manager and Nodes. There will be only one manager server, but 100 nodes. Both the manager and nodes are Docker ...
4
votes
1answer
338 views

AWS ECS/EKS: EC2 vs Fargate mode

Amazon offers the option of launching their container management services ECS and EKS in two modes: EC2 and Fargate. In the former, normal VMs (EC2 instances) are used and ECS or EKS (depending on ...
0
votes
0answers
214 views

ECS task fails to start when deploying Docker multi container App in Elastic beanstalk

I have a beanstalk application environment that use multi container docker instances.I have also pushed an image(simple app running a simple node js) to my ECR repository.But whenever i try to ...
3
votes
1answer
333 views

Why don't the instances in the auto-scaling group get assigned public ip addresses unless it's a default vpc?

I'm trying to migrate our deployment process over to aws code deploy (by following instructions here:https://pionect.nl/autoscaling-aws-laravel-codedeploy-opsworks-chef-automation/). When I'm ...
3
votes
1answer
64 views

Is running load balanced autoscale apps cheaper on AWS Kubernetes than just using EC2 resources?

We're running like 100+ servers on AWS EC2 with like 20 microservices all load balanced and autoscaled with 2 to 3 instances. The cost has become....very significant. I'm wondering if migrating ...
1
vote
1answer
17 views

I have an custom AMI and want to run certain config commands at initial boot, depending on the autoscale instance that starts it. How do I do this?

I have a custom AMI that contains the dependencies for several applications. The only difference between the applications is several configuration options that can be configured by a bash script. (i....
3
votes
1answer
94 views

AWS: Application vs Classic Load Balancer

My senario is this: I am using 2 EC2 instances which I want reachable via urls as follows: sub1.domain.com sub2.domain.com I am aware of the fact that AWS Application Load Balancers currently ...
-2
votes
2answers
67 views

Why does amazon charge for free tier usage?

I have an issue with amazon free tier account, I have deployed two EC2 instances (1 linux and 1 windows) on amazon each having 30GB of storage which is permissible under free tier, these instances are ...
0
votes
0answers
72 views

ACM SSL certificate with Elastic Beanstalk

We switched from Comodo wild-card SSL CA to a free version from AWS through the Certificate Manager. The domain is registered on Namecheap and the only way we could get the website to route traffic ...
3
votes
0answers
125 views

Preventing an IAM user from overriding launch template parameters on RunInstance

I'm trying to set up an IAM policy that allows a user to run an instance (ec2:RunInstances), but only from a specific launch template - and without making any changes to that launch template's ...
-2
votes
1answer
336 views

Make instance with newuser by terraform

I want to make new instance with "user1" rather than ec2-user(AWS) default.i want achieve this by terraform. Like in azure terraform it can be done by "os_profile{}", but how can i do in aws by ...
1
vote
1answer
36 views

Way to Connect to all ec2-instances one by one

Is there any way through which I can connect to all ec2-instances one by one through Python script to extract some server information from there. Please note that all ec2-instances lies behind a ...
1
vote
1answer
72 views

Amazon Web Service (AWS): Spot request active followed by cancelled terminating

5/31/2018, 5:21:51 PM fleetRequestChange cancelled 5/31/2018, 5:15:46 PM fleetRequestChange cancelled_terminating 5/31/2018, 5:15:46 PM fleetRequestChange active 5/31/2018, 5:15:...
2
votes
1answer
136 views

does boto3 have a way to get resource limits from a region?

Right now I am looking for ec2 instances type limits for a given region. I would like to put in place an audit script that tracks our usage vs our limits for a given set of things. Also open to ...
2
votes
1answer
784 views

How to set an existing IAM role to a new instance while spinning in terraform?

I am trying to attach an existing role created in AWS, but I am not able to add it in Terraform Code. I tried to add the role in instance profile but it didn't work either for me. Is there any direct ...
1
vote
1answer
361 views

Terraform: ignore_changes conditionally? (temporary EC2 instance public IP address)

I've got a couple of EC2 instances managed by Terraform, with public IP addresses in a VPC. With each Terraform run, I'm updating DNS records based on those public IPs. I don't need these instances ...
3
votes
1answer
69 views

Saving time on an EC2 instance

I have started playing around with AWS (privately). I have one free tier Amazon Linux 2 VM running right now, which serves a "fat" service (in a docker container) to myself and one other person. It ...
4
votes
2answers
512 views

How to find out the used Key pair name via AWS CLI?

I'm aware of get-password-data command which can display PasswordData data like: $ aws ec2 get-password-data --instance-id i-0123456789 { "InstanceId": "i-0123456789", "PasswordData": "\r\...
5
votes
2answers
263 views

How to automate rolling upgrades for ec2 running linux behind elastic and/or application load balancer?

Would like to ask for recommendations on ready automated solutions or templates for rolling ec2 instance upgrade on AWS, requiring a reboot with ELB/ALB. Specifically required to perform the ...
3
votes
1answer
1k views

How to export EC2 snapshot into S3 bucket?

I've created a snapshot of EC2 instance via: aws ec2 create-snapshot --volume-id vol-xyz In aws ec2 create-snapshot help we can read: Creates a snapshot of an EBS volume and stores it in Amazon ...
5
votes
1answer
336 views

Create multiple EC2 instances using python script (in loop iteration)

I Have JSON file in which email address and count of instances are specified.I'm using python script to iterate through that file and get username/count number (count number will be used as number of ...
0
votes
2answers
531 views

How to get instance's route table id using CLI?

I'd like to find a route table id associated with the given EC2 instance. How can this be achieved using AWS CLI? I've tried to use aws ec2 describe-vpcs, but the route tables are not there. I'm ...
8
votes
4answers
5k views

How to run a script or a command on EC2 instance via AWS CLI?

According to New EC2 Run Command news article, AWS CLI should support a new sub-command to execute scripts on remote EC2 instances. However I've checked in aws ec2 help, but I can't find the relevant ...
-3
votes
1answer
203 views

How much it will cost for AWS for deploying a inventory management application [closed]

I am developing an inventory management application i want to use AWS EC2 . which will have 10-15 users and storage about 2GB .as a newbie i could not understand the pricing can somebody help me how ...
2
votes
1answer
36 views

How to track (non ECS) container costs on EC2?

I've been evaluating Netflix Ice - as a billing tool - but it appears to only work at the Machine instance level - not at the container level. I'm looking for a tool to help generate billing reports ...
1
vote
2answers
965 views

What is the AWS user permission that allows attaching and detaching IAM Roles to instances?

My coworker is trying to attach IAM roles to EC2 instances and doesn’t have permissions. I’m trying to work out which permissions to give him. My question is: What is the AWS user permission that ...
6
votes
2answers
132 views

What should I use for configuration management on AWS?

I am trying to find a solution for configuration management using AWS OpsWorks. What I can see is AWS offers three services for OpsWorks Chef Automate Puppet AWS stacks I have read basics of all ...
1
vote
1answer
47 views

Application monitoring in multiple EC2 instances

I am running 10 AWS EC2 instances. Each of them running different applications. I am looking for application level monitoring solution. Suppose, if Apache fails in any instance, it should notify me ...
5
votes
1answer
67 views

Large number of host emulation

What would be the best way to emulate (or really to instantiate) a large number of hosts / virtual machines / docker containers in the cloud? Assume I want to run a scenario where 10,000 hosts are ...
4
votes
1answer
359 views

Unable to launch multiple EC2 instances in different availability zones using terraform

Whenever I try to launch the instances, I am getting the following error message. Please help with this. Error: Error applying plan: 3 error(s) occurred: * aws_instance.example[0]: 1 error(s) ...