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.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Is it possible to deploy RDS in multiple region in AWS with read and write replica

I have an application that I need to make it accessible across 4 regions, I saw blogs and other posts in the internet that speaks about the read replica of AWS RDS MySQL Server, is it possible to ...
0
votes
1answer
39 views

ansible-playbook: how to dynamically, conditionally set a large deployment environment (variable space) in a playbook?

I am using an ansible playbook to deploy a php web application in aws. The deployment is repeated many times, with a different environment, for each customer. The different scenarios range from ...
1
vote
1answer
37 views

How CircleCI, Terraform and AWS should interact in CI/CD Pipeline

I'm new to devops and I'm have a hard time finding resources to help me with this question. My Goal is to have an automated CI/CD pipeline to launch my project. Basically I have a GitHub repo with a ...
0
votes
0answers
15 views

Can't reach AWS/EC2 + K3D + nginx + service

I'm having trouble accessing my K8S service... I'm running the service in K3D on an ec2 instance in AWS. I have deployed a simple HTTP rest API to this and I want to access it via a browser. I have a ...
0
votes
1answer
25 views

How to get code onto aws ec2 instance using terraform and gitlabs

I've just started learning Terraform (utilizing the AWS provider) and I have managed to replicate our infrastructure which includes quite a few amazon web services. I can successfully deploy it and ...
1
vote
0answers
12 views

Cost minimization in aws parallel cluster

I'm new to aws cloud service. I have to create a parallel cluster in aws. So, I'm using aws parallel cluster. But the problem is, when creating a cluster the NAT gateway billing me when I'm not using ...
1
vote
2answers
70 views

ansible & jinja2: How to reference JSON structure items whose keys are variables?

I am using ansible's community.aws.iam_server_certificate_info module to get information about a server certificate on aws ec2, and registering it as a variable "server_cert_info_result" ...
1
vote
2answers
244 views

How do I use the remote-exec provisioner with Terraform?

I am using Terraform 0.14 and AWS. I am trying to write a .tf file that will invoke a remote-exec command via Terraform's provisioner. This code does not work: resource "aws_instance" "...
0
votes
0answers
22 views

How to convert an ECS infra to an EKS infra?

I just need advise to see if I understand Kubernete's objects correctly in my context. I have the following ECS-based infrastructure. An api.mycompany.com Route53 recored points to the ALB ALB ...
0
votes
1answer
17 views

how to set automatic git pull from bitbucket and complie project on ec2 instance create event with auto scaling

I have just started reading about AWS services. I have a project where the backend is created with Spring-Boot, front-end is created with React and PostgreSQL is used as database. Both backend and ...
1
vote
1answer
125 views

Is it possible to have an aws EKS infrastructure as code?

Is it possible to declare "a complete production level EKS with other aws services" using terraform? I know that terraform has an eks module and an aws provider. But I'm not sure if one can ...
2
votes
1answer
39 views

what is difference between “sudo shutdown now” versus “aws ec2 stop-instances”

When logged onto a AWS EC2 instance say some Ubuntu box and I issue sudo shutdown now how is that different from stopping the same instance using aws ec2 stop-instances --instance-ids $...
1
vote
1answer
137 views

How do I SSH into an EC2 instance from AWS gitlab-runner?

I have setup my own gitlab-runner on AWS following GitLab's walkthrough (Autoscaling GitLab Runner on AWS EC2). One step in my deployment is to SSH into another EC2 instance. The SSH connection fails ...
0
votes
1answer
69 views

Ansible No such file or directory error message for any executable in Amazon Linux AMI

I'm trying to run this command in a Amazon Linux AMI instance - name: Run docker shell: systemctl enable docker && systemctl start docker And receiving this error message "stderr&...
1
vote
1answer
65 views

Using a combination of Terraform and Ansible to create dynamic AWS EC2 infrastructure

The company I work for wants to prevent provider lock-in adn therefore told us to use Terraform+Ansible instead of Cloudformation. We already decided to use terragrunt as an addon. While the ...
0
votes
0answers
16 views

How can I efficiently manage multiple ec2 instances with a Panel

My Current Scenario is: I have over 20+ AWS ec2 instances running, with each instance running a single website. I have to use SSH for every task I have to perform related to server. I have to keep ...
1
vote
0answers
22 views

Power on AWS EC2 hosts by specifying their ansible hostnames

I have inventoried my AWS EC2 hosts using the ansible Ec2 inventory plugin. I would like to be able to power on hosts that are currently powered off, by specifying hostname patterns in ad-hoc ansible ...
0
votes
0answers
122 views

Correct usage of community.aws.ec2_instance_info module in a playbook

I have successfully authenticated to AWS and pulled an inventory using the aws inventory plugin. I'm interested in getting facts about instances. The documentation says that this playbook should get ...
1
vote
1answer
188 views

Can you inherit a template_cloudinit_config in another template_cloudinit_config object in Terraform?

I recently discovered template_cloudinit_config within Terraform, and I'm hoping I can utilize it to specify something like the code below. Basically my goal is to declare a core ...
0
votes
1answer
16 views

AWS elb vs google cloud for multiple small nodejs mini-apps deployment

Currently i use AWS ELB --single instances do deploy & manage multiple versions of the same nodejs app (over 10), which differ only by the configuration. Each app is running some endless process ...
0
votes
0answers
11 views

How would I automate the deployment of an S3 Bucket file to a remote external server which exists on the other side of an AWS VPN Tunnel?

So my current AWS VPC consists of an EC2 jump server which is on the cloud side of a site-to-site VPN tunnel and the other side is connected to a customer server. So I am trying to find out how I can ...
0
votes
1answer
80 views

AWS t4g instance type not eligible

According to the blog post since september/2020 and up to december/2020 instance type t4g will be available. I'm trying to create a machine, on one of the right zones (Oregon) according the FAQ, and ...
1
vote
0answers
266 views

Ansible/AWS dynamic inventory — How to create groups based on tags?

I am trying to create custom groups, based on tags. I am using this doc as a reference: https://docs.ansible.com/ansible/latest/plugins/inventory.html#inventory-plugins As a baseline, in my aws_ec2....
1
vote
2answers
115 views

Ansible - merging inventories to share variables across?

Is it possible to merge inventories so I can share variables across them? Let's say I have two inventory files. Inventory A and Inventory B. They are both in a directory called inventories. Variables ...
0
votes
1answer
2k views

Ansible playbook error: “Connection timed out during banner exchange”

I am trying to connect to my bastion host and then tunnel that ssh connection to connect to a jenkins host but keep running into the connection timed out error. The error message in full is: fatal: [&...
1
vote
1answer
61 views

Ansible dynamic inventory using AWS plugin — how to obtain internal DNS records or private IP?

Seeking help from those who've worked with dynamic inventory in Ansible. I have Ansible set up with the aws_ec2 plugin (not using the python script as it's been too problematic). Currently, I'm only ...
0
votes
1answer
22 views

How to Automate VM provisioning and setup using code?

Here is what I want to achieve. I write code(Java, NodeJs, Go) to tell the program which Cloud Provider to choose- AWS/Azure write code to create a instance , lets say AWS - EC2 instance under which ...
1
vote
1answer
39 views

Sending HTTP requests to private EC2 DNS from other EC2 host works, but not from container on EC2 host

I want to make a container hosted on one EC2 host communicate with another container hosted on another EC2 host. Currently, if I send an HTTP request from host A to host B using host B's private DNS ...
-1
votes
2answers
48 views

A tool to orchestrate cloud server (virtual machine) instances

Whenever I use search keywords such as "orchestration" or "server clusters" or "iaas" I'll always end up in hundreds of results that are going to talk about containers ...
1
vote
1answer
16 views

AWS Setting instance to use domain from another account

We're transitioning between accounts and we have an app on our new account but we want to use the domain from our old account. We plan on shutting off the old account soon and transitioning everything ...
1
vote
0answers
39 views

Terraform duplicates the security groups, how do I stop it?

I'm using terraform to create two instances and a security group. Here is how I did it: # bastion host resource "aws_instance" "bastion_1a" { ami = data.aws_ami....
2
votes
1answer
74 views

Cross Account EC2 Access from within Amazon Workspace

I have a requirement to setup a bastion host (Amazon Workspace) to connect to an ec2 instance living on a different account. As Amazon Workspaces cannot assume a role the way EC2s can, A cross ...
2
votes
1answer
38 views

amazon ec2 ip whitelisted on a third party service provider

Currently we are running an application in a single amazon ec2 machine. On our application we are using some third party solution. For using those solution, we have asked the third party service ...
1
vote
1answer
27 views

AWS: Onboarding on premise instance

Is there a way to onboard the Raspberrypi device in AWS. So that the same device can be managed using ec2 console and it can seamlessly work with the rest of AWS services? I am just an experimental ...
3
votes
2answers
25 views

Install apache on awa ec2 from locally installed ansible server on my laptop

I would like to install apache2 remotely on aws ec2 instance from my locally installed ansible server on my laptop. I have also the. pem key of the instance. Now what Ip need to put in /etc/ansible/...
4
votes
1answer
69 views

EC2 EBS Free Tier - Is Storage Reusable?

Can I delete an EC2 instance and start off from scratch on my EBS free tier usage? For instance, I was running a Red Hat server with 10 GB of EBS being used. However, I deleted that EC2 within a few ...
1
vote
1answer
945 views

AWS API Gateway as an http proxy to ALB

I have a setup of API Gateway proxying all the requests to my EC2 instances behind load balancer (ALB). But I want api endpoint to have a nice domain my-api.mydomain.com. I'm trying to accomplish that ...
1
vote
1answer
355 views

User data in original windows ec2 instance does not get executed in custom ami

I created a windows Ec2 instance with user data in it. In my ec2 instance I downlaoded git and installed it. Later in EC2 instance, I provided it with the user data which was supposed to download a ...
0
votes
1answer
32 views

JFrog on dedicated disk

Is it possible to install JFrog on a separate disk? For example in an AWS EBS I find their documentation a bit confusing, so i checked don't have a walk-through for this. I'm looking at this ...
1
vote
1answer
31 views

Spin up an EC2 instance from within the application

I am developing the architecture of this application and the way we need to scale is not just stateless API requests, but it's a logical split of responsibilities. In other words, we may only be able ...
8
votes
1answer
269 views

Automate custom docker image deployment on AWS

This question is related to my previous one - but a bit more descriptive. I am trying to build automate the generation and deployment of a docker container. The docker container is created with packer....
1
vote
1answer
241 views

private subnets in an Auto Scaling Group on aws?

I watched a video series wherein the author used 3 private subnets for his Auto Scaling Group, and I also read the premium answer on this forum wherein the author says that you can use both public and ...
0
votes
1answer
29 views

Where is Puppet's enviroments directory on Amazon Linux2?

I am using Puppet version 3.8.7 on Amazon Linux2, trying to find the directory containing the Puppet environments. I tried to find it with the find command looking for files named "production" or ...
1
vote
1answer
27 views

Is there a way to clone an ec2 from inside the ec2 terminal?

I want to be able to back up my linux accadamy lab servers but they don't provide a way to to this. I'm wondering if it's posible to clone my EC2 lab server from inside the EC2 to get round this?
1
vote
0answers
189 views

Why does an 'InvalidSnapshot.NotFound' occur in Packer and how to solve it? [closed]

When I'm running sudo packer2 build -debug template.json with this code: { "variables": { "profile": "aws", "region": "eu-west-1" }, "builders": [{ "type": "amazon-chroot", "profile": "{{...
1
vote
1answer
21 views

How to ensure EC2's OS/application is loaded?

Recently I was playing around a bit with AWS as a part of a course that I am doing. I came across a situation that to be honest is keeping be in vilo. I made a web application which connects to a ...
1
vote
1answer
25 views

Kubernetes api service unit file

i was going through the kubernetes the hard way(kelsey), i see in the API server unit file with a cluster ip range as --service-cluster-ip-range=10.32.0.0/24 \ is it a default ip range ? my VPC ...
2
votes
1answer
41 views

What is the difference between EKS and EC2 installed kubernets?

I'm newbie in AWS usage. I don't understand the difference between EKS and EC2 installed kubernets? Amazon EKS makes it easy for you to run Kubernetes on AWS without needing to install and ...
0
votes
1answer
76 views

How to setup a permanent storage volume for EC2 instance?

I created an EC2 instance of r5ad.xlarge and installed Jenkins on it. However, after a few jobs I configured and ran I saw a warning about no space left. Then realised Jenkins was installed on 8 GB ...
1
vote
1answer
44 views

can't access my instances by public IP in a VPC (aka: what is wrong with my terraform)?

As stated in the title of the question, I have a Terraform file (attached below), but the infrastructure it builds doesn't allow me to connect by SSH (I get "Connection timed out"). So either the ...