How can I replace a specific instance in an AWS Auto Scaling Group?
I'm looking for a procedure that I can use to replace a specific instance in an AWS scalegroup, all the while maintaining AZ "balance" and not reducing capacity while waiting for a new instance to...
View ArticlePrevent manually attached EC2 being terminated by Auto Scaling Group
I want to have a single EC2 instance to be the only running instance within the Load Balancer, and only under load, the Auto Scaler can add additional instances as per configuration. This works well...
View ArticleIs there a way to enable python virtualenv through userdata in an Amazon EC2...
I am trying to enable virtualenv and install few pip packages. The below code doesn't enable the virtualenv. What I wanna do is Install python, pip, enable virtualenv, install boto3, seaborn, and...
View ArticleWhy do pm2 processes duplicate when I change EC2 machine type?
When changing the EC2 instance type from a t2medium to a txlarge and running the processes again, these are duplicated and without having made any changes to the ecosystem configuration, only the...
View ArticleCan't ssh to AWS EC2: Identity file not accessible
I'm unable to ssh to my EC2 server and am getting the error:ssh -i /Users/Skeniver/Keepass/skeniver.pem ubuntu@xx.xxx.xx.xxxIdentity file /Users/Skeniver/Keepass/skeniver.pem not accessible: No such...
View ArticleHow to increase windows 10 PowerShell session expire time?
I'm using windows 10 PowerShell for ssh to my AWS account. But if I'm keeping PowerShell idle for few seconds then it gets expired. How can I increase the session expire time?
View ArticleHow is my https:443 server serving http:80 also?
I have a server EC2 instance running in AWS, behind a load balancer which currently doesn’t really do anything since I only have one instance (eventually, I planned on using it to scale and distribute...
View ArticleValue of property VPCZoneIdentifier must be of type List of String
"wordpressASG": {"Type": "AWS::AutoScaling::AutoScalingGroup","Properties": {"AvailabilityZones": ["ap-southeast-2a","ap-southeast-2b" ],"VPCZoneIdentifier": [ {"ref": "subnetA" }, {"ref": "subnetB" }...
View ArticleIs it better to use NGINX to as load balancer and connect to multiple low...
I am planning to deploy one application for my product which will have user base from internet i have configured NGINX as gateway and planning to use it as load balancer to connect to multiple low...
View ArticleUnable to connect SSH on AWS EC2
My SSH and FTP connection suddenly stopped working. I am unable to connect with my ec2 instance running ubuntu using SSH and FTP, here is the setting of my instance.Security group setting:Inbound:`SSH...
View ArticleRun a Java application on EC2
I have an AWS application with the following architecture:Get incoming requests from API Gateway.Requests are forwarded to a Load Balancer, and then to an EC2 instance running Java code.The EC2...
View ArticleNginx time out while reading response header from upstream:...
Trying to deploy my Ruby on Rails app on AWS EC2 with puma. Facing issue of connection timeout with puma.sock in nginx logs. Trying to figure out the issue but cant succeed till yet*1 upstream timed...
View ArticleHow to find the username of the instance launched in amazon-ec2?
I m having trouble connecting to amazon ec2 instance using ssh. The key pair matches. On google-ing a bit i find that username is not the same for all instances. I assumed its always ec2-user. How can...
View ArticleContinuously push elasticsearch on docker data to S3
I have an AWS EC2 instance, which has a docker container running elasticsearch. Every day, some process pushed new documents into elasticsearch. I want to push those documents to an S3 bucket the day...
View ArticleError: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64
Got these errors while installing and didn't find a specific answer for it. So, I'm offering the solutions as I found them in case anyone else encounters this: Error: httpd24 conflicts with...
View ArticleHow to specify Target Capacity for AWS Spot Fleet in terms of vCPU or memory...
in terms of specifying a Target Capacity for a Spot Fleet the documentation is clear:You can choose to set the target capacity in terms of instances or a performance characteristic that is important to...
View ArticleAWS security groups
I have a single active EC2 instance making requests via a Python script. There is a security group attached to this particular instance with SSH, HTTP, and HTTPS communication with ONLY sources and...
View ArticleAttach IAM role to multiple EC2 instances
There seems to be plenty of documentation that outlines making a role with its corresponding policies and then attaching that to a new orpre-existing (single) EC2 instance. However, when you have many...
View ArticleTerraform EC2 Windows Server with IIS
I have just started working on a project that is hosted on an AWS EC2 Windows Instance with an IIS. I want to move this setup to more reliable place, and one of the first things I wanted to do was to...
View Articlerun elasticsearch from docker on ec2 [duplicate]
im trying to start a elasticsearch instance for dev porpuse(the smallest possible , dont care), is inside ec2 t2.micro (in order to avoid cost running the elasticsearch service from aws)so ... i pulled...
View Article