If you are using Amazon Lex V2, refer to the Amazon Lex V2 guide instead.
If you are using Amazon Lex V1, we recommend upgrading your bots to Amazon Lex V2. We are no longer adding new features to V1 and strongly recommend using V2 for all new bots.
Step 2: Create a Lambda Function
In this section, you create a Lambda function using a blueprint (lex-make-appointment-python) that is provided in the Lambda console. You also test the Lambda function by invoking it using sample Amazon Lex event data that is provided by the console.
Sign in to the AWS Management Console and open the AWS Lambda console at https://console.aws.amazon.com/lambda/
. -
Choose Create a Lambda function.
-
For Select blueprint, type
lex
to find the blueprint, and then choose the lex-make-appointment-python blueprint. -
Configure the Lambda function as follows.
-
Type the Lambda function name (
MakeAppointmentCodeHook
). -
For the role, choose Create a new role from template(s), and then type a role name.
-
Leave other default values.
-
-
Choose Create Function.
-
If you are using a locale other than English (US) (en-US), update the intent names as described in Updating a Blueprint for a Specific Locale.
-
Test the Lambda function.
-
Choose Actions, and then chooseConfigure test event.
-
From the Sample event template list, choose Lex-Make Appointment (preview). This sample event uses the Amazon Lex request/response model, with values set to match a request from your Amazon Lex bot. For information about the Amazon Lex request/response model, see Using Lambda Functions.
-
Choose Save and test.
-
Verify that the Lambda function ran successfully. The response in this case matches the Amazon Lex response model.
-
Next Step
Step 3: Update the Intent: Configure a Code Hook