logo
down
shadow

How to properly auto-scale AWS EC2 Instances group in a relatively complex infrastructures?


How to properly auto-scale AWS EC2 Instances group in a relatively complex infrastructures?

Content Index :

How to properly auto-scale AWS EC2 Instances group in a relatively complex infrastructures?
Tag : amazon-web-services , By : Arun Thakkar
Date : November 28 2020, 08:01 AM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

x instances already in AWS load balancer, makign auto scale group starts adding more instances


Tag : amazon-web-services , By : Edo
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , It would still create minimum number of instances the moment you create the autoscaling group. Reason being that the autoscaling policy will create its own instances, and won't consider the instances already in the process, so one will have to get rid of the old ones and let the new ones be.

Getting a list of instances in an EC2 auto scale group?


Tag : amazon-web-services , By : Jim F.
Date : March 29 2020, 07:55 AM
wish of those help I actually ended up writing a script in Python because I feel more comfortable in Python then Bash,
#!/usr/bin/env python

"""
ec2-autoscale-instance.py

Read Autoscale DNS from AWS

Sample config file,
{
    "access_key": "key",
    "secret_key": "key",
    "group_name": "groupName"
}
"""

from __future__ import print_function
import argparse
import boto.ec2.autoscale
try:
    import simplejson as json
except ImportError:
    import json

CONFIG_ACCESS_KEY = 'access_key'
CONFIG_SECRET_KEY = 'secret_key'
CONFIG_GROUP_NAME = 'group_name'


def main():
    arg_parser = argparse.ArgumentParser(description=
                                         'Read Autoscale DNS names from AWS')
    arg_parser.add_argument('-c', dest='config_file',
                            help='JSON configuration file containing ' +
                                 'access_key, secret_key, and group_name')
    args = arg_parser.parse_args()
    config = json.loads(open(args.config_file).read())
    access_key = config[CONFIG_ACCESS_KEY]
    secret_key = config[CONFIG_SECRET_KEY]
    group_name = config[CONFIG_GROUP_NAME]

    ec2_conn = boto.connect_ec2(access_key, secret_key)
    as_conn = boto.connect_autoscale(access_key, secret_key)

    try:
        group = as_conn.get_all_groups([group_name])[0]
        instances_ids = [i.instance_id for i in group.instances]
        reservations = ec2_conn.get_all_reservations(instances_ids)
        instances = [i for r in reservations for i in r.instances]
        dns_names = [i.public_dns_name for i in instances]
        print('\n'.join(dns_names))
    finally:
        ec2_conn.close()
        as_conn.close()


if __name__ == '__main__':
    main()

Boot strapping AWS auto scale instances


Tag : amazon-web-services , By : platformNomad
Date : March 29 2020, 07:55 AM
This might help you EC2 instances offer a feature called User Data meant to solve this problem. User Data executes a shell script to perform provisioning functions on new instances. A typical pattern is to use the User Data to download or clone a configuration management source repository, such as Chef, Puppet, or Ansible, and run it locally on the box to perform more complete provisioning.
As @e-j-brennan states, it's also common to prebundle an AMI that has already been provisioned. This approach is faster since no provisioning needs to happen at boot time, but is perhaps less flexible since the instance isn't customized.

Why does Azure Auto-Scale scale go lower then minimum amount of instances?


Tag : azure , By : pttr
Date : March 29 2020, 07:55 AM
it should still fix some issue Oops. Apparently I had set up a day / night time schedule, and at this certain point it went to the night time schedule where it was min/max 1 instance.

AWS: how to configure EC2 instances during auto scale


Tag : amazon-web-services , By : John Tate
Date : March 29 2020, 07:55 AM
this one helps. There are basically two choices for configuring an Amazon EC2 instance that is created using Auto Scaling:
A fully-configured AMI A User Data script that configures the instance
Related Posts Related QUESTIONS :
  • How to invoke lambda when lex does not process the intent automatically?
  • When to use AWS Lambda and when to use Kubernetes (EKS)?
  • EB CLI only works as sudo; else gives 'DistributionNotFound'
  • Trigger email when a new record is created in DynamoDB
  • Step Functions AWS SAM CLI Local Connection Refused Error
  • Corda Node deployment on aws
  • best way to copy data from one aws queue (SQS) to another SQS
  • Internal networkloadbalancer wont route to instance X when curl from NLB DNS from instance X
  • Unable to ping Private IP of DMS Replication Instance from on-premises over Site-to-Site VPN & DMS source DB endpoin
  • Ampliy withAuthenticator v/s with withOAuth
  • Setup Ingress-Nginx rate limit rps for a specific path
  • Add to product list in AWS Service Catalog and Launch it
  • Cannot Restrict AWS Regions in my Account
  • How to check if the Key Pair is still used in EC2?
  • Amazon SQS message disappeared
  • DynamoDB Local Secondary Index vs Global Secondary Index
  • Using an AWS Network ACL versus an SG for access control?
  • Internet Access to lambda function without NAT
  • Rename an Amazon RDS Option group
  • Two clusters on EKS, how to switch between them
  • How to set aws proxy host to Spark config
  • aws crawler not creating awsdatacatalog
  • How to prevent AWS SQS from deleting a message when Lambda function triggered fails to process that message?
  • AWS-Cognito: How to assign user roles in the user pool?
  • How to Solve unknown_ca error on WSO2IS-5.7 when using MySQL RDS as backstore?
  • AWS S3 Bucket Policy throws Access Denied Error
  • Setting AWS Lambda as Principal in Permission Policy
  • Running multiple ECS tasks based on same task definition but with different environment variables
  • S3 Bucket Notification or CloudWatch Event Rule to call a Lambda on Object level changes?
  • Uploading multiple files in parallel to Amazon S3 with Goroutines & Channels
  • Can I send an HTTP request to an Alexa's Skill Endpoint in order to trigger a reprompt in Alexa?
  • How to write a Join query in AWS DocumentDB
  • Resolving dynamic reference in EC2 user data cloudformation template
  • How to use federated Auth using aws-amplify API without hosted UI?
  • Does AWS guarantee my lambda function will be triggered 100%?
  • How to consume messages from Apache Kafka which is third party using AWS services
  • Can I put nginx on public subnet and the webserver[s] on private subnet of AWS VPC?
  • Redshift - Redesign tables to use DIST and SORT keys (performance issue)
  • AWS Glue pushdown predicate not working properly
  • Is there a way to determine which functions are invoked from a go module during compilation?
  • Can Lex start the conversation?
  • How to add new origins to an already existing cloudfront distribution through cloudformation?
  • What is the difference between `Ref: logicalName` and `!Ref logicalName` in AWS Cloudformation templates in YAML?
  • Can't specify Lambda alias or version for SNS subscription
  • Access token and ID token storage for serverless app
  • Cloudformation: Error: Member must have length less than or equal to 20
  • YAML_FILE_ERROR: YAML file does not exist
  • How to find who created an AWS AMI?
  • How to Fan-Out SQS
  • AWS Import large CSV file
  • Why can I send AWS S3 bucket events to only one AWS lambda?
  • Amazon Elastic Map Reduce - Keep Server alive?
  • In the Amazon AWS API, how do you query if an item is Prime/Super Saver eligible?
  • how to get books information from amazon web service
  • Kibana health status is RED
  • Referencing Environment Variable in Serverless.yml File from jenkinsfile
  • Route53 point to other url (e.g. API Gateway endpoint)
  • Error: Incorrect attribute value type - Terraform datasource(aws_ip_ranges)
  • source_dest_check in aws_launch_configuration in terraform
  • How custom role(of Lambda) works with EC2 role policy?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com