Questions tagged with AWS Auto Scaling

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

I have an autoscaling group, recently change to attribute based selection, and now have many errors: > Launching a new EC2 instance. Status Reason: Internal error. Launching EC2 instance failed. during attempts scale-outs. I can't find any more detail as to what the error is.
1
answers
0
votes
153
views
Jon
asked 4 months ago
HI Team I am installing SAS in EC2 instance. SAS software installation is tied to private IP address and port. I am using autoscaling=1. So when an EC2 instance goes down, I am expecting a new instance should come up. But the hostname and IP address will be different in new EC2 instance. So SAS doesn't work in new instance. 1) How can I block/reserve private IP address and Hostname in AWS? 2) How to use the blocked private IP address and Hostname (above) to be used in the new instance that comes through Auto scaling?
2
answers
0
votes
206
views
asked 4 months ago
I have an ECS cluster backed by an EC2 capacity provider. The cluster has two services: a replica doing the actual work, and a daemon running the Datadog log collection agent. The replica service is autoscaled with a target tracking policy tracking CPU utilisation at 80%. The capacity provider is configured with managed scaling with target capacity 100%, and managed termination protection is enabled. My understanding is that the capacity provider managed scaling turns instance protection on when adding instances and off when there are no longer any replica tasks running on an instance - daemons task are not counted. But what I see in my cluster are some ECS instances with only the single daemon task running on them. WhenI go to the autoscaling group, I see that associated EC2 instance has "Protected from: scale in". Why is it like this and is this what's causing EC2 instances with single daemon tasks to not be terminated?
1
answers
0
votes
45
views
Jon
asked 4 months ago
I have been exploring AWS-CDK recently and programming language I am using is Python. Since I am a newbie in this concept, I am trying to achieve one thing: How can I create AutoScaling Group for existing ec2 instance? I assume somewhere i need to mention the instance id, attached here by as one parameter to ASG. Now what exact issue I am facing is, I am not able to understand how to pass the details of existing ec2 instance while configuring AutoScalingGroup. I am not creating VPC using CDK, instead I created one EC2 instance using console. Any leads would be really helpful!! Below is the code for AutoScalingGroup: { from constructs import Construct from aws_cdk import aws_autoscaling as autoscaling from aws_cdk import (aws_ec2 as ec2, aws_ssm as ssm, Stack) class AutoScalingStack(Stack): def init(self, scope:Construct, id: str,vpc: ec2.Vpc, **kwargs) -> None: super().init(scope,**kwargs) autoscaling.AutoScalingGroup(self, "ASG", vpc=vpc, launch_template= launch_template ) PS: I am unable to find AWS CDK tag.
1
answers
0
votes
146
views
asked 4 months ago
hi Guys, So, I was tasked with adding a schedule to the auto scaling group to run Monday-Friday, 8am to 5pm only. So my schedule look like this:![screenshot of the schedule](/media/postImages/original/IMxn55yOIGRfOaQ346EAE49A) Apparently, the schedule is not working as it should and I can't find what is wrong. Can anyone identify what is wrong with this configuration. So the EC2 should only run between hours of 8am to 5pm MON-FRI. Thank you.
2
answers
0
votes
60
views
asked 4 months ago
I found info that AWS will reject scheduled scaling actions that have overlapping recurrence strings. Taken from https://jayendrapatil.com/aws-auto-scaling/ > A user is trying to setup a recurring Auto Scaling process. The user has setup one process to scale up every day at 8 am and scale down at 7 PM. The user is trying to setup another recurring process which scales up on the 1st of every month at 8 AM and scales down the same day at 7 PM. What will Auto Scaling do in this scenario > Auto Scaling will throw an error since there is a conflict in the schedule of two separate Auto Scaling Processes However, when I tried to reproduce it, 2 overlapping policies applied and executed without any issues. ![Enter image description here](/media/postImages/original/IMQNXe2vnIRPeauqbmU5eWvg) ![Enter image description here](/media/postImages/original/IM9LAWlFrwQZ24pNRNOQUkHg) The only issue I had if I explicitly try to define same StartTime for both recurrent scheduled scaling action. But in case I'm adding them using python/boto3/API I'm not defining StartTime explicitly and everything working fine. The question is: Am I missing something or AWS technically allows creating overlapping scheduled scaling actions?
Accepted AnswerAWS Auto Scaling
1
answers
0
votes
73
views
asked 4 months ago
A company's on-premises application deployment cycle was 3-4 weeks. After migrating to the AWS Cloud, the company can deploy the application in 2-3 days. Which benefit has this company experienced by moving to the AWS Cloud?
Accepted AnswerAWS Auto Scaling
2
answers
0
votes
513
views
asked 5 months ago
I have an async sagemaker endpoint, with an auto scaling policy (sample code below) . Everytime I update the model.tar.gz file , i delete the old endpoint and create a new one, with the same name and same setting. do i have to delete and re-create the autoscaling as well? ``` client = boto3.client("application-autoscaling") response = client.register_scalable_target( ServiceNamespace="sagemaker", ResourceId=resource_id, ScalableDimension="sagemaker:variant:DesiredInstanceCount", MinCapacity=0, MaxCapacity=5, ) response = client.put_scaling_policy( PolicyName="Invocations-ScalingPolicy", ServiceNamespace="sagemaker", ResourceId= "endpoint/myendpoint/variant/test" ... ```
1
answers
0
votes
40
views
asked 5 months ago
We are seeing that recently there seems to be issue with ``` Capacity rebalanceInfo When you enable capacity rebalancing, and a rebalance notification is sent to an instance, EC2 Auto Scaling automatically attempts to replace the instance before it is interrupted. ``` When enabled, we see that our instance kept terminating and stopping, which creates unnecessary loads of our cache/DB/other infra as every new instance requires setup/init This is NOT due to spot instance being terminated as the termination reason is always ``` At 2022-10-24T01:59:17Z an instance was taken out of service in response to an EC2 instance rebalance recommendation. ``` What we expect is when an instance is only terminated only when 1. spot capacity termination request 2. spot lifetime exceeded Perhaps this is an issue with recent capacity limit issue w east? ``` Launching a new EC2 instance. Status Reason: Could not launch Spot Instances. InsufficientInstanceCapacity - We currently do not have sufficient capacity in the Availability Zone you requested. Our system will be working on provisioning additional capacity. ```
1
answers
0
votes
60
views
asked 5 months ago
I want to use an Amazon Sagemaker endpoint for a custom classification model. The endpoint should only handle sporadic input (say a few times a week). For this purpose I want to employ autoscaling that scales the number of instances down to 0 when the endpoint is not used. Are there any costs associated with having an endpoint with 0 instances? Thanks!
1
answers
1
votes
266
views
asked 5 months ago
Hi All, I currently have an Application Load Balancer that has two rules : If the request is coming from a specific path Example: /forum/, use a target group that points to an instance For any other request use this target group ( another instance ) In the autoscaling settings I have added these two target groups so that if autoscaling occurs and terminates the instances, they will be re-registered. This works correctly, however, I noticed that when termination happens the target group registers two instances instead of one and therefore my site looks broken. Is there a setting that I’m missing? Thank you
1
answers
0
votes
89
views
asked 5 months ago
What tool might one use to perform load testing on an AppStream Fleet? We would like to monitor our Application Auto Scaling Scaling Policies behavior on a larger scale. Is there a tool that would automate the process of connecting to the streaming URL and maybe even logging in? What are our options here for getting some statistics over for example response time?
2
answers
0
votes
47
views
asked 5 months ago