diff --git a/events/cognito.go b/events/cognito.go index 9de9a615..6e120b4f 100644 --- a/events/cognito.go +++ b/events/cognito.go @@ -226,8 +226,9 @@ type CognitoEventUserPoolsCustomMessage struct { // CognitoEventUserPoolsCustomMessageRequest contains the request portion of a CustomMessage event type CognitoEventUserPoolsCustomMessageRequest struct { - UserAttributes map[string]interface{} `json:"userAttributes"` - CodeParameter string `json:"codeParameter"` + UserAttributes map[string]interface{} `json:"userAttributes"` + CodeParameter string `json:"codeParameter"` + UsernameParameter string `json:"usernameParameter"` } // CognitoEventUserPoolsCustomMessageResponse contains the response portion of a CustomMessage event diff --git a/events/testdata/cognito-event-userpools-custommessage.json b/events/testdata/cognito-event-userpools-custommessage.json index 48c43f29..5a431d5b 100644 --- a/events/testdata/cognito-event-userpools-custommessage.json +++ b/events/testdata/cognito-event-userpools-custommessage.json @@ -13,7 +13,8 @@ "phone_number_verified": true, "email_verified": false }, - "codeParameter": "####" + "codeParameter": "####", + "usernameParameter": "{username}" }, "response": { "smsMessage": "",