How to trigger SNS topic if IAM user is created


I got a code at internet to send email via SES service if IAM user is created, I need to trigger my SNS if IAM user is created , can anyone please help me with this please??

Let me share the link of lambda code for ses with iam ,

I tried using sns and got my mail. Only lambda code differs and rest are same. I want to get the account number,date,time and name of the iam user to be sent as mail

My SNS code:

import boto3

def lambda_handler(event, context):
    Message="iam user created",
    Subject='Iam user creation Alert !!!',)

I receive message like iam user created , I want like Iam user named "NAME" has been created on "ACCOUNT_NUMBER" on "DATE" at "TIME"

Can anyone please help me to sort this out!!

1 Answer

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