AWS - ASG with SQS
Today I was working on a weird request. The ask was to create an SQS notification for the ASG Instance launch.
ASG comes with an
option of SNS notification while provisioning.
But for SQS is kind
of complicated.
Steps:
1) Create a launch
template
2) Create an ASG.
3) Create an SQS of
STANDARD type. FIFO SQS does not support notification.
4) Make sure the SQS access
policy allows sending Messages.
5) Create an IAM role with assumable service to "Service": "autoscaling.amazonaws.com" and the SQS actions like "SendMessage".
6) Create a lifecycle hook via CLI. Because UI does not provide an option for notification target (SQS).
Let's create a launch template:
We are done with ASG. Will proceed with SQS.
Comments
Post a Comment