Skip to content

Navigation Menu

Sign in
Sign up

feat(events): add LinkParameter to CognitoEventUserPoolsCustomMessageRequest (fixes #592) - #627

Open
nghiack7 wants to merge 1 commit into
aws:main from
nghiack7:feat/cognito-custom-message-link-parameter
Open

feat(events): add LinkParameter to CognitoEventUserPoolsCustomMessageRequest (fixes #592) #627
nghiack7 wants to merge 1 commit into
aws:main from
nghiack7:feat/cognito-custom-message-link-parameter

Conversation

@nghiack7

@nghiack7 nghiack7 commented May 9, 2026

Copy link
Copy Markdown

Summary

Fixes #592linkParameter is missing from CognitoEventUserPoolsCustomMessageRequest.

The AWS Cognito Custom Message trigger documentation shows a linkParameter field in the request payload. This field is populated when the TriggerSource is CustomMessage_VerifyUserAttribute or CustomMessage_AdminCreateUser, and contains the verification link placeholder for the email message.

Without this field, users are forced to work around it:

  1. Unmarshal the event as json.RawMessage and parse manually
  2. Embed the library struct in a custom struct that adds the field

Changes

  • events/cognito.go: Added LinkParameter string (with omitempty) to CognitoEventUserPoolsCustomMessageRequest
  • events/testdata/cognito-event-userpools-custommessage.json: Added linkParameter example value to the test fixture

Test plan

  • go test ./events/ -run TestCognito passes — round-trip JSON test verifies linkParameter unmarshals and re-marshals correctly
  • go test ./events/ full events package passes with no regressions

...Request
The AWS Cognito Custom Message trigger documentation shows a linkParameter
field in the request payload for verification link scenarios
(CustomMessage_VerifyUserAttribute, CustomMessage_AdminCreateUser).
This field was missing from the Go struct, forcing users to unmarshal
into a custom type or use json.RawMessage to access it.
Fixes aws#592 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

linkParameter missing in CognitoEventUserPoolsCustomMessageRequest

1 participant

AltStyle によって変換されたページ (->オリジナル) /