Is there a way to create a lambda function which track all roles assumed by a user in the last 24 hours ?

0

I want to create a lambda function that sends me an sns alert of the list of all roles assumed by a user over the last 24 hours whenever a role X in account B is assumed by another role from account A .

1 Antwort
1

Hi yes.

You can try leveraging CloudTrail to log API calls for assume role: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html

You can combine it with EventBridge rule, which then can trigger a an alert towards SNS, actually without need to use Lambda function.

Hope it helps ;)

profile picture
EXPERTE
beantwortet vor einem Jahr
profile pictureAWS
EXPERTE
überprüft vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen