23 votes

How to get Autoscaling group Instances IP adresses

As alternative, my version without any jq/awk/sed/cut $ aws autoscaling describe-auto-scaling-instances --region us-east-1 --output text \ --query "AutoScalingInstances[?AutoScalingGroupName=='ASG-...
ALex_hha's user avatar
  • 7,283
16 votes

Static IP address for outgoing traffic from AWS autoscaling group

I understand this is an old thread - for someone who has a similar use-case now, AWS nat-gateway would be a better solution.
packetlord's user avatar
13 votes
Accepted

AWS Fargate service: scale to zero?

I’m not sure how exactly it would work. When there are no healthy ALB targets the ALB returns 503 error, hence your visitors would see an error page instead of your website. That may trigger a Fargate ...
MLu's user avatar
  • 25.3k
10 votes

How can I automatically cycle a new image in an AWS Auto Scaling Group?

The easier way is to increase number of minimum instances in Auto-Scaling Group (ASG) to double of your current count, wait when all of them are started and then change that minimum number of ...
Sergey Kuznetsov's user avatar
8 votes

Static IP address for outgoing traffic from AWS autoscaling group

I don't have enough reputation to comment on the above answers, but I wanted to add some information you will need to know if using a NAT gateway to achieve this. When you create a NAT gateway, you ...
mmiddleton's user avatar
7 votes

AWS Fargate service: scale to zero?

If re-writing your app to fit the above response it's not an option or costly, you could look into GCP CloudRun CloudRun it's serverless containers developed by GCP. You can pack your website in a ...
Jimmy's user avatar
  • 221
4 votes
Accepted

Automatically start an AWS EC2 instance from network request (wake-on-LAN)

Lambda works somewhat like this, though instead it makes the user wait while it spins up an app. In Lambda though you don't have an instance to manage -- its all done under the hood. I'd also check ...
Jason Martin's user avatar
  • 5,083
4 votes
Accepted

Amazon RDS and Auto-Scale EBS: Security Groups

To restrict RDS access to only your Auto Scaling EC2 instances, and to allow access to your EC2 instances only from your ELB, you're going to use the same method: add a rule to your security group ...
Matt Houser's user avatar
  • 10.2k
4 votes

AWS auto-scaling: Why do we have 'desired capacity' value at start?

Think of the min and max as global bounds. The desired capacity can change over time, as you say, in response to a load signal. This number represents the number of instances you want "now."
dmourati's user avatar
  • 25.8k
4 votes
Accepted

How to avoid duplicate scale-in with step scaling policy?

I had exactly the same problem. What i ended up doing was changing my scale down policy to SimpleScaling reducing by one instance at a time and setting a 10m cooldown. I've also changed my scale down ...
Joe Lipson's user avatar
4 votes
Accepted

AWS auto-scaling policy - scaling-up too often

It looks like a fresh EC2 instance takes about 15 to 20 minutes to initialize and start working, but your cooldown is only 5 minutes. So 5 minutes after increasing your desired count, your new EC2 ...
Matt Houser's user avatar
  • 10.2k
4 votes
Accepted

IAM user is not authorized to perform: application-autoscaling:DescribeScalableTargets

I need to add the following custom policy to one of my permission groups { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "application-...
Anthony Kong's user avatar
  • 3,448
4 votes

scaling up when new object is inserted in s3

I think you'll want to setup a CodeDeploy and CodePipeline to do this. Codepipeline can monitor the source, s3, and then send the update to codedeploy to update the EC2 instances. http://docs.aws....
strongjz's user avatar
  • 852
4 votes
Accepted

is my understanding for aws auto-scale up and load balancer wrong?

When you are using Auto Scaling and Load Balancing, you want all your EC2 instances to be identical. So they are all (a) rooted on the same AMI image, and (b) proceed through the same initialization ...
Matt Houser's user avatar
  • 10.2k
4 votes
Accepted

AWS Autoscaling Group won't honor five minute draining policy of the Target Group when scaling down

As described in the linked answer you will need an ASG Lifecycle hook to start with. Whenever the Terminating event occurs fire up a Lambda function and in that Lambda deregister your instance from ...
MLu's user avatar
  • 25.3k
4 votes

AWS RDS: Invalid max storage size for engine name postgres and storage type gp2: 198

Your picture shows a maximum storage threshold of 198GB and usage of 197GB. According to this page the "The maximum storage threshold is the limit that you set for autoscaling the DB instance. ...
Tim's user avatar
  • 32.6k
3 votes

How can I automatically cycle a new image in an AWS Auto Scaling Group?

As of 6/16/2020 EC2 AutoScaling supports Instance Refresh - a single API call to replace every instance in an ASG safely and autonomously. To use it, update your ASG, setting a Launch Configuration or ...
Mark Mullen's user avatar
3 votes

AWS autoscaling and ec2 t2

My approach is to scale before you run out of CPU credits. A simple way is to define a minimum acceptable credit balance, for me this is 50. You can do this within CloudWatch. 'Create Alarm', EC2 ...
user663470's user avatar
3 votes
Accepted

Configure Amazon EC2 auto-scaling by database event

Your observations are correct - you will not be able to use Amazon's own AutoScaling controls for this type of event. You can however script it via Amazon's CLI tools. You could poll for the file in ...
Craig Watson's user avatar
  • 9,660
3 votes
Accepted

How to use PHP memcached for session storage with Auto Scaling?

Your memcached server(s) should be outside of your ASG. As you know, state cannot be stored in ASG instances. So, either use AWS's Elasticache service or run your own memcached server, then point your ...
EEAA's user avatar
  • 110k
3 votes
Accepted

AWS security group for newly launched instances

You don't add IP addresses for EC2 instances to your RDS security group, you add another security group. This gives every instance in the security group your EC2 instance are in access to your RDS ...
Tim's user avatar
  • 32.6k
3 votes
Accepted

EC2 Auto-Scaling: configure Target Tracking Policies to prefer Spot instances

If I set the target to 70% CPU utilization, when will it decide to scale up and when to scale down? - AWS doesn't say exactly how it works, but it will create two CloudWatch alarms for each target ...
Shahad's user avatar
  • 326
3 votes
Accepted

Auto scaling web server running multiple websites

Create an AMI from your configured web site (EC2 instance). Use this AMI in your launch configuration. This is the simplest method for launching new (or replaced) instances with an Auto Scaling Group. ...
John Hanley's user avatar
  • 4,904
3 votes
Accepted

Scale out Azure SQL Database

There's no direct way to have a DB scale up when a Web App does, but there is a workaround. You can have the scale up action on the web app trigger a webhook, so you can have that call either Azure ...
Sam Cogan's user avatar
  • 38.9k
3 votes
Accepted

Searching AWS AutoScalingGroup resources by tags

Unfortunately you can't use aws recourcegroupstaggingapi simply because this API doesn't support AutoScaling Groups at the moment. That's also why AutoScaling info is not returned in get-resources ...
MLu's user avatar
  • 25.3k
3 votes
Accepted

Host discovery in AWS VPC

Check out this post for the many ways to do Host / Service discovery on AWS. Many of the methods will be suitable for your usecase. Also consider using managed Amazon MQ instead of building and ...
MLu's user avatar
  • 25.3k
3 votes

AWS Elastic Load Balancer and target group health check fail for no apparent reason

I had the same problem, it took me a long time to find where is the error that may cause Classic Load balancer "Out Of Service" error. Go to "Health Check" > edit "Ping target" from "Http" to "TCP" ...
user516489's user avatar
3 votes

Launching a new EC2 instance. Status Reason: Not authorized for images: Launching EC2 instance failed

You can only use public AMIs and private AMIs that were explicitly shared with you. If you used a private AMI that is no longer shared with you, then you can no longer start instances with that AMI. ...
Michael Hampton's user avatar
3 votes
Accepted

Kubernetes: horizontal auto-scaling based on metrics in another namespace

Ah, I've figured it out. Here's the part of the prometheus-adapter configuration I needed: rules: - seriesQuery: '{__name__=~"^nginx_ingress_.*",namespace!=""}' seriesFilters: [] ...
Volodymyr Melnyk's user avatar
3 votes
Accepted

Infrastructure used in Amazon EKS

Your understanding is roughly correct. There is a 'control plane' that is managed by Amazon with EKS (effectively the master nodes for the kubernetes cluster). This is invisible to you as the AWS ...
Shogan's user avatar
  • 256

Only top scored, non community-wiki answers of a minimum length are eligible