Skip to content

Monitoring a public parameter store event

0

Is it possible to monitor, through Eventbridge, an update event of a public parameter store?

Like this:

{ "source": ["aws.ssm"], "detail-type": ["Parameter Store Change"], "detail": { "name": ["/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id"], "operation": ["Update"] } }

My goal is to trigger a Lambda function by starting an image builder pipeline, each time AWS provides a new ECS AMI.

Thanks a lot!

1 Answer
0

Unfortunately, it is not possible to directly monitor update events for public parameters in AWS Systems Manager Parameter Store through Amazon EventBridge in the way you've described.

EventBridge can be used to monitor changes to parameters that you own and manage within your AWS account, but it does not provide events for updates to public parameters managed by AWS.

However, you can achieve your goal of triggering a Lambda function to start an image builder pipeline when AWS provides a new ECS AMI through an alternative approach:

  1. Create a custom parameter in your account that mirrors the value of the public parameter you're interested in (/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id).

  2. Set up a scheduled Lambda function or use AWS Systems Manager Maintenance Windows to periodically check the value of the public parameter and update your custom parameter if there's a change.

  3. Configure an EventBridge rule to monitor changes to your custom parameter. The rule pattern would look similar to what you provided, but with your custom parameter name:

    { "source": ["aws.ssm"], "detail-type": ["Parameter Store Change"], "detail": { "name": ["your-custom-parameter-name"], "operation": ["Update"] } }

  4. Set up a Lambda function as the target for this EventBridge rule. This function can then start your image builder pipeline when triggered.

This approach allows you to indirectly monitor changes to the public parameter and achieve your desired workflow of starting an image builder pipeline when AWS provides a new ECS AMI.
Sources
Setting up notifications or triggering actions based on Parameter Store events - AWS Systems Manager
Amazon EventBridge event examples for Systems Manager - AWS Systems Manager
Monitoring Systems Manager events with Amazon EventBridge - AWS Systems Manager

answered a year ago
EXPERT
reviewed a year 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.