get know email id from the api gateway

0

Hi. I have scenario, publishing 2 emails for register end points in sns. Forming and sending URL with API gateway with authroization status (reject/approve). Once request approved /rejected receving response API and lambda (proxy integration) . Here, i need to know which email account what did the action (approved/rejected) How can i get the email account through invoking api request.

1 Answer
4

Log Email by using Lambda may help, below sample code:

import json

def lambda_handler(event, context):
    email = event['email']
    action = event['action']
    print(f"Email: {email}, Action: {action}")
    # Process the action
    return {
        'statusCode': 200,
        'body': json.dumps('Action processed successfully')
    }
EXPERT
answered a month 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.

Guidelines for Answering Questions