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 Launch Template which has the security group attached to it. I can launch an instance that works fine from this template. From the template I created an Auto Scaling gorup. When I look at the AS group I do not see the Security Group at all. I just see a dash. When I try to run the AS group it fails to create the instance. When I look at the failed instances they too do not have a security group. What am I doing wrong??? How do I add the group to the AS Group or get it to pull in the one from the Launch Template.
3
answers
0
votes
23
views
asked a day ago
Hi, I currently run a Serverless application using Vercel, and I'm looking for a way to run a scheduled script in AWS. The script will simply total up some database rows and re-insert them into a database table (Using Node.JS). What's the best way for me to host this on AWS and have it run every ~15 minutes. I'm aware a solution like EC2 would work just running a permanent server that's not serverless, although is there a better way which powers down when not running?
1
answers
0
votes
15
views
asked 13 days ago
Hi, I have an environment on Elastic Beanstalk with Application Load Balancer listen to HTTPS and HTTP as well, we also have a auto scaling group with 6 to 10max instances. The application is facing an issue that we're struggling to find, a segfault (we're on it) once it happens in an instance it get terminated and start a new ok. However during the instance replacement, the state of the enviroment becomes "Severe" and the application get off, stops responding. We're looking for a solution for high availability, if we have 4 instances running and one requires to be terminated for some reason, shouldn't the balancer keep the enviroment live and available? What should we look for to have it in place?
0
answers
0
votes
21
views
asked 14 days ago
please recommend me any strategies for optimizing Auto Scaling on my instances
1
answers
0
votes
14
views
asked 17 days ago
I have an autoscaling policy on my RDS Aurora cluster which has been working well for a while. I recently added cloudtrail alerts when a role attempts to do something that is unauthorized, and every time there is a scaling action the AWSServiceRoleForApplicationAutoScaling_RDSCluster throws an error: ``` { "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "XXXXX:AutoScaling-UpdateDesiredCapacity", "arn": "arn:aws:sts::XXXXX:assumed-role/AWSServiceRoleForApplicationAutoScaling_RDSCluster/AutoScaling-UpdateDesiredCapacity", "accountId": "XXXXX", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "XXXXX", "arn": "arn:aws:iam::XXXXX:role/aws-service-role/rds.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_RDSCluster", "accountId": "XXXXX", "userName": "AWSServiceRoleForApplicationAutoScaling_RDSCluster" }, "webIdFederationData": {}, "attributes": { "creationDate": "2023-01-09T16:54:55Z", "mfaAuthenticated": "false" } }, "invokedBy": "rds.application-autoscaling.amazonaws.com" }, "eventTime": "2023-01-09T16:54:56Z", "eventSource": "ec2.amazonaws.com", "eventName": "DescribeSubnets", "awsRegion": "us-east-1", "sourceIPAddress": "rds.application-autoscaling.amazonaws.com", "userAgent": "rds.application-autoscaling.amazonaws.com", "errorCode": "Client.UnauthorizedOperation", "errorMessage": "You are not authorized to perform this operation.", "requestParameters": { "subnetSet": {}, "filterSet": { "items": [ { "name": "subnet-id", "valueSet": { "items": [ { "value": "XXXXX" }, { "value": "XXXXX" } ] } } ] } }, "responseElements": null, "requestID": "XXXXX", "eventID": "XXXXX", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "XXXXX", "eventCategory": "Management" } ``` I don't see any way that I can modify the permissions of this service role, but I also don't like my cloudwatch alerts being filled with these notifications. Any way I can give this role the proper permissions?
1
answers
0
votes
31
views
jonb
asked 19 days ago
Hello, Have we any features in aws EC2 instance like docker containers which are newly created when one container is crashed or in fault? Auto-scaling is somewhat part of this but as per my knowledge it only launched when the primary instance is not matching our already given health check parameters like CPU exceeds over 80% while configuring auto-scaling. Please share your knowledge. Thanks.
1
answers
0
votes
30
views
asked 24 days ago
Hello, Let's suppose we have Auto Scaling groups that has 2 desired capacity and configured to launch them as spot instances with price-capacity-optimized strategy We configured the ASG to launch two different instance types: **t3.medium, t3.large** At first run, the running spot instacnes are as the following depending on the allocation strategy: **2 with t3.medium** Now let's suppose that, the other instance type t3.large got better allocation strategy (price-capacity-optimized), **Will the ASG switch the running spot instances from t3.medium to be t3.large?** Could you please advise? Thanks
1
answers
0
votes
31
views
Maan
asked a month ago
Hi , I was testing Distributed load test . I am also having an autoscaling group with an ALB, which was set to scale out in case of CPU utilization of 60 %. After the test, the CPU utilization reached 10% and the web page of my EC2 instance started giving 5XX errors, so the ALB saw the machine as unhealthy. Accordingly the autoscaling group deleted this machine and created a new one. This should not have happened. As when we try to access the ec2 web page directly without the ALB during the 10% CPU utilization it is working fine. but from the ALB DNS name it is giving us the 5XX errors Can someone please help explain why this is happening and what should be edited in the distributed load test ?
1
answers
0
votes
19
views
asked a month ago
Hi guys, I've found that is possible to use math in a target tracking scaling policy for Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-target-tracking-metric-math.html) I've tried to use same config in application auto-scaling for service-namespace ECS without success This is my config ``` { "CustomizedMetricSpecification": { "Metrics": [ { "Label": "ack_total", "Id": "m1", "MetricStat": { "Metric": { "MetricName": "rabbitmq_queue_messages_ack_total[switch_events]", "Namespace": "Prometheus" }, "Stat": "Average" }, "ReturnData": false }, { "Label": "published_total", "Id": "m2", "MetricStat": { "Metric": { "MetricName": "rabbitmq_queue_messages_published_total[switch_events]", "Namespace": "Prometheus" }, "Stat": "Average" }, "ReturnData": false }, { "Label": "Relation (ack_total + 1) / (published_total + 1)", "Id": "e1", "Expression": "(m1 + 1)/(m2 + 1)", "ReturnData": true } ] }, "TargetValue": 1.0 } ``` This is the command I've used: ``` aws application-autoscaling put-scaling-policy --service-namespace ecs --policy-name rabbitmq-pub-ack-scaling-policy --scalable-dimension ecs:service:DesiredCount --resource-id "service/XXXXX/events" --policy-type TargetTrackingScaling --target-tracking-scaling-policy-configuration file://alarm-definition.json ``` I'm getting this error: ``` Parameter validation failed: Missing required parameter in TargetTrackingScalingPolicyConfiguration.CustomizedMetricSpecification: "MetricName" Missing required parameter in TargetTrackingScalingPolicyConfiguration.CustomizedMetricSpecification: "Namespace" Missing required parameter in TargetTrackingScalingPolicyConfiguration.CustomizedMetricSpecification: "Statistic" Unknown parameter in TargetTrackingScalingPolicyConfiguration.CustomizedMetricSpecification: "Metrics", must be one of: MetricName, Namespace, Dimensions, Statistic, Unit ``` based on doc available in https://docs.aws.amazon.com/autoscaling/application/APIReference/API_CustomizedMetricSpecification.html seems impossible to use a custom metric with math Best regards.
2
answers
0
votes
50
views
asked a month ago
Hello, I have a next.js/mysql application running on docker on my laptop. It uses docker-compose. I would like to deploy it to aws and take advantage of Load Balancer and Auto Scaling Groups. Do you suggest to use ECS to deploy the whole container (can I use LB and ASG) or should I better use cloudformation and only deploy the application code? In the latter case how should I setup my dev environment? I would like to have the DEV and the TEST/PRD environments consistent. thanks
2
answers
0
votes
51
views
asked a month ago
We are using Opensearch cluster with 5 Data node and 3 master Node. Before some days, I have added a new node into my OpenSearch cluster, but still the node upgradation process is running. I have checked in my kibana and found that there is 5 node storing the data and new nodes don't have any data. Is there any way i can distribute the data on all newly added node
1
answers
0
votes
22
views
profile picture
asked a month ago
Hello, I'm creating a launch template and autoscaling group through cloud formation. The auto-scaling group is currently pointed to the DefaultVersion of the launch template, which is version 1. The latest version of the launch template is version 2. I updated the default version of the launch template to version 3, but I don't see it reflected in the auto-scaling group. I know we update the launch template version through instance refresh, but I would like to know if this is expected behavior to still see version 1 in the autoscaling group even though the default version is now version 2. I want to handle the updates through cloud formation. The problem I'm trying to solve is how do I push changes through cloud formation and handle the updates gracefully in the auto-scaling group. For example - I have two autoscaling groups using the same launch template. Then I decide to update one auto-scaling group to have a different ami. There will be two versions of the launch template, version 1 will have the old ami, and version 2 will have the latest ami. I'd like to gracefully roll out the changes to the autoscaling group 2 through cloud formation. Question 1 - How can I change the auto-scaling group through cloud formation and replace instances gracefully? Question 2 - If I change the version number in the cloud formation template, does it terminate instances first and then redeploy the new ec2 or the other way around?
2
answers
0
votes
72
views
asked 2 months ago