Events are not generated for App Load balancer scale up/down

0

I am looking to automate the workflow of creating "Traffic Mirror Session" with source as App Load Balancer ELB interface when whenever new ELB instance created by AWS.

The Eventbridge is not showing any events for App LB scale up/down or when aws creates new instances though all the events in the account is enabled for the event bus.

Please suggest how to receive events when new ELB instances or new App LB ELB interface created by AWS.

asked 2 years ago200 views
1 Answer
0
Accepted Answer

Thanks for the clear description.

As you may already know, there's no specific ALB event when ALB scales up/down. However, when ALB scales, we will see changes in terms of network interfaces. We could therefore monitor the following event pattern (leveraging CloudTrail events) for potential automation:

// monitor all ELB calls for interface changes

{
  "source": ["aws.ec2"],
  "detail-type": ["AWS API Call via CloudTrail"],
  "detail": {
    "eventSource": ["ec2.amazonaws.com"],
    "eventName": ["CreateNetworkInterface", "DeleteNetworkInterface"],
    "userAgent": ["elasticloadbalancing.amazonaws.com"]
  }
}

// or monitor all calls from specific ELB for interface changes

{
  "source": ["aws.ec2"],
  "detail-type": ["AWS API Call via CloudTrail"],
  "detail": {
    "eventSource": ["ec2.amazonaws.com"],
    "eventName": ["CreateNetworkInterface", "DeleteNetworkInterface"],
    "requestParameters": {
      "description": ["ELB app/alb_name/dbe23be94aa68888"]
    }
  }
}
AWS
weidi
answered 2 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