Hi,
I am creating a user via the Cognito console and send an invitation email. Then, I am using a lambda in order to customize the message and sent a link instead of a code (see https://medium.com/@jacobjoy/redirect-user-using-amazon-cognito-confirmation-url-d8ccb11bac75)
However, in the event object I do not get the clientId, that I need to pass to create the link. Any explanation or way to solve this issue?
EVENT {
version: '1',
region: 'eu-central-1',
userPoolId: 'eu-central-1_HMCpf6bx0',
userName: 'a7233ead-1d30-4337-984b-a6fc4fb2ab74',
callerContext: {
awsSdkVersion: 'aws-sdk-js-2.1291.0',
clientId: 'CLIENT_ID_NOT_APPLICABLE'
},
triggerSource: 'CustomMessage_AdminCreateUser',
request: {
userAttributes: {
sub: 'a7233ead-1d30-4337-984b-a6fc4fb2ab74',
'cognito:user_status': 'FORCE_CHANGE_PASSWORD',
email: 'rada26@qaenv.it'
},
codeParameter: '{####}',
linkParameter: '{##Click Here##}',
usernameParameter: '{username}'
},
response: { smsMessage: null, emailMessage: null, emailSubject: null }
}
2023-02-13T13:33:22.794Z c375476d-e852-4f5e-8ecf-0eeb0388c878 INFO EVENT { version: '1', region: 'eu-central-1', userPoolId: 'eu-central-1_HMCpf6bx0', userName: 'a7233ead-1d30-4337-984b-a6fc4fb2ab74', callerContext: { awsSdkVersion: 'aws-sdk-js-2.1291.0', clientId: 'CLIENT_ID_NOT_APPLICABLE' }, triggerSource: 'CustomMessage_AdminCreateUser', request: { userAttributes: { sub: 'a7233ead-1d30-4337-984b-a6fc4fb2ab74', 'cognito:user_status': 'FORCE_CHANGE_PASSWORD', email: 'rada26@qaenv.it' }, codeParameter: '{####}', linkParameter: '{##Click Here##}', usernameParameter: '{username}' }, response: { smsMessage: null, emailMessage: null, emailSubject: null } }
callerContext