fix: Makes two properties optional on MigrateUserResponse. #663
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
No issue available
Description of changes:
Makes two properties Optional on CognitoEventUserPoolsMigrateUserResponse:
desired_delivery_mediumsforce_alias_creationHow I diagnosed:
My Cognito Lambda was panicking when trying to deserialize the Lambda Event:
I used Python to print the Event, and I found that all of the fields on the CognitoEventUserPoolsMigrateUserResponse were
null:{ "version": "1", "triggerSource": "UserMigration_Authentication", "region": "us-east-1", "userPoolId": "us-east-1_123abc", "userName": "test@test.test", "callerContext": { "awsSdkVersion": "aws-sdk-unknown-unknown", "clientId": "123abc" }, "request": { "password": "Testtest", "validationData": { "custom": "property" }, "userAttributes": null }, "response": { "userAttributes": null, "forceAliasCreation": null, "enableSMSMFA": null, "finalUserStatus": null, "messageAction": null, "desiredDeliveryMediums": null } }So I believe the deserialization was failing on
forceAliasCreation. Then when I ran this event locally, it also failed to deserializedesiredDeliveryMediums.