Skip to content

Files

Latest commit

a2c5b8b · Oct 30, 2024

History

History

Amazon.Lambda.CognitoEvents

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 21, 2017
Sep 3, 2024
Oct 30, 2024
Oct 26, 2023
Oct 26, 2023
Jan 19, 2024
Mar 22, 2022
Oct 26, 2023
Oct 26, 2023
Mar 22, 2022
Oct 26, 2023
Mar 22, 2022
Mar 22, 2022
Oct 26, 2023
Oct 26, 2023
Mar 22, 2022
Oct 26, 2023
Mar 22, 2022
Mar 22, 2022
Oct 26, 2023
Jan 19, 2024
Dec 1, 2016
Mar 22, 2022
Oct 26, 2023
Oct 26, 2023
Mar 22, 2022
Oct 26, 2023
Mar 22, 2022
Mar 22, 2022
Oct 26, 2023
Mar 22, 2022
Mar 22, 2022
Oct 26, 2023
Mar 22, 2022
Mar 22, 2022
Oct 26, 2023
Oct 26, 2023
Mar 22, 2022
Oct 26, 2023
Oct 26, 2023
Jan 19, 2024
Jan 19, 2024
Jan 19, 2024
Oct 26, 2023
Oct 26, 2023
Oct 26, 2023
Mar 22, 2022
Mar 22, 2022
Oct 26, 2023
Jan 19, 2024
Oct 26, 2023
Sep 3, 2024
Apr 27, 2017

Amazon.Lambda.CognitoEvents

This package contains classes that can be used as input types for Lambda functions that process Amazon Cognito events.

Sample Function

The following is a sample class and Lambda function that receives Amazon Cognito event record data as an input and writes the record data to CloudWatch Logs. (Note that by default anything written to Console will be logged as CloudWatch Logs events.)

public class Function
{
    public void Handler(CognitoEvent cognitoEvent)
    {
        foreach(var datasetKVP in cognitoEvent.DatasetRecords)
        {
            var datasetName = datasetKVP.Key;
            var datasetRecord = datasetKVP.Value;

            Console.WriteLine($"[{cognitoEvent.EventType}-{datasetName}] {datasetRecord.OldValue} -> {datasetRecord.Op} -> {datasetRecord.NewValue}");
        }
    }
}