AWS Elastic Beanstalk - can I set the name of the

2019-06-08 13:24发布

问题:

I can set the name of the LoadBalancer that EB defines with the following ebextension configuration:

Resources:
  AWSEBLoadBalancer:
    Type: "AWS::ElasticLoadBalancing::LoadBalancer"
    Properties:
      "LoadBalancerName":
        "Fn::Join":
          - ""
          -
            - {Ref: AWSEBEnvironmentName}
            - "-elb"

This lets me address the loadbalancer by name in scripts, and also makes the loadbalancer list in the EC2 console much easier read (can just scan for the ELB you're interested in instead of having to dig through tags).

I'd like to do similar for the autoscaling group, is there any way to do this?


Edit: I've decided not to manipulate the ASG directly (should be done through EB settings, not by manipulating the ASG directly, to avoid inconsistency). But I would still like to rename the ASG, just to make the console view cleaner.

回答1:

This can be done with { Ref: AWSEBAutoScalingGroup }.

A complete list of all supported options is available here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-format-resources-eb.html