Predictable ASG and ELB names after environment rebuild


My customer is trying to monitor in their ElasticBeanstalk infrastructure.

They are using Grafana with Cloudwatch and in combination with ElasticBeanstalk. Every environment rebuild results in a completely new name for the ASGs and ELBs. The filter they're building to get the right ASG and ELB for their application in Grafana is quite complex and results in them not being able to configure any alerts.

Is there a way to achieve some predictability in the ASG and ELB names for ElasticBeanstalk applications? They were expecting what they see in ECS, where the names are somewhat more stable and easy to predict from Grafana.

1 Answer
Accepted Answer

IMHO, you can use EBS notification feature in your case.

You will receive a notification like example below:

  "Records": [
      "EventSource": "aws:sns",
      "EventVersion": "1.0",
      "EventSubscriptionArn": "arn:aws:sns:us-east-1...ElasticBeanstalkNotifications-Environment-foo-app...",
      "Sns": {
        "Type": "Notification",
        "MessageId": "111",
        "TopicArn": "arn:aws:sns:us-east-1...ElasticBeanstalkNotifications-Environment-foo-app",
        "Subject": "AWS Elastic Beanstalk Notification - New application version was deployed to running EC2 instances",
        "Message": "Timestamp: Thu May 07 23:38:22 UTC 2015\nMessage: Lambda Function Test: New application version was deployed to running EC2 instances.\n\nEnvironment: foo-app\nApplication: FooApp\n\nEnvironment URL:\nRequestId: 222\nNotificationProcessId: 333",
        "Timestamp": "2015-05-07T23:39:18.628Z",
        "SignatureVersion": "1",
        "Signature": "hello-sig",
        "SigningCertUrl": "",
        "UnsubscribeUrl": "",
        "MessageAttributes": {}

You might use the 'Environment' value in 'Message' of this notification to modify grafana's resource in Lambda

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions