Lambda functions that you want to add to or keep in your user pool. As demonstrated in the example that follows, include entries for all Provide all relevant parameters, Amazon Cognito sets the values of any missing parameters to Operation requires all the parameters of your user pool and the parameters that you want to change. Include aĬustomSMSSender or CustomEmailSender parameter in an Update your user pool to add custom sender Lambda triggers. For more information, see Deploying Lambda functions as. Zip your function with your SDK dependencies, and upload the function to For more information andĭownload links, see AWS Encryption SDK programming languages in the AWS Encryption SDK Developer Guide. Open your function and add the AWS Encryption SDK. The Lambda package, complete the following steps.Įxport your Lambda function as a. For more information, see AWS Encryption SDK programming languages. The code, your own custom message, and destination phone number to the custom APIĪdd the AWS Encryption SDK to your Lambda function. In your function, decrypt the secret and process any relevant metadata. Amazon Cognito uses AWS Encryption SDK toĮncrypt secrets before Amazon Cognito sends the secrets to the custom sender Lambda function. Lambda function instead of the default behavior that sends an SMS message withĪws lambda add-permission -function-name lambda_arn -statement-id " CognitoLambdaInvokeAccess" -action lambda:InvokeFunction -principal Ĭompose your Lambda function code to send your messages. After you add your custom SMS sender trigger, Amazon CognitoĪlways sends user attributes, including the phone number, and the one-time code to your The following procedure assigns a custom SMS trigger, a custom email You can set up a custom SMS sender trigger that uses custom logic to send SMS messagesįor your user pool. Yourįunction can use API operations to query and modify your resources, or record event Custom SMS sender responseĪmazon Cognito doesn't expect any additional return information in the response. One or more key-value pairs that represent user attributes. Operations in the request that it passes to the post authentication Amazon Cognito doesn't includeĭata from the ClientMetadata parameter in AdminInitiateAuth and InitiateAuth API Lambda function, you can use the ClientMetadata parameter in the AdminRespondToAuthChallenge and RespondToAuthChallenge API actions. The custom SMS sender Lambda function trigger. One or more key-value pairs that you can provide as custom input to The encrypted code that your function can decrypt and send to your String is always customSMSSenderRequestV1. For a custom SMS sender event, the value of this
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |