How to Trigger an AMI Operation

Asked 2 years ago, Updated 2 years ago, 138 views

CloudWatch Events
that automatically delete snapshots when AMI is deleted I'd like to do the same thing as
On the AWS Console Cloud Watch Rules screen
You cannot select an event called DeregisterImage

I can only choose events related to snapshot, not image.
How can I trigger an image creation or deletion?

Even if I specify it directly in JSON, I don't understand the detail or type of the event

The UI of the image is written in English and this is written in Japanese, but
Is there a difference in console choices depending on the language?
Or do you mean that the events you can choose are limited by region?

Enter a description of the image here

aws aws-cloudwatch

2022-09-30 21:45

2 Answers

CloudWatch Events Event Examples From Supported Services
No AMI creation/deletion events are found in .
Has the specification changed?

You can pick up RegisterImage, DeregisterImage from the CloudTrail log, but I think there is a delay in API execution→log.

CloudWatch Events Event Examples From Supported Services
Tutorial:Log AWS API Calls Using CloudWatch Events


2022-09-30 21:45

The URL I am referring to is out of date.
Enable CloudTrail logging and configure the following settings beforehand:

Service Name: EC2
Event Type: AWS API Call via CloudTrail
Specific Operations: DeregisterImage


2022-09-30 21:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.