Set Up Multiple Slots in a Lex Chatbot

Get your chatbot to transfer money between accounts!

Introduction

⚑️ 30 second Summary

Welcome to Part FIVE of the Lex series!

In this five-project Lex series, you'll learn how to create a practical chatbot, BankerBot, that can help your imaginary bank's customers check their account balance and transfer money between accounts!

In your first four projects, you learnt how to:

  • πŸ’¬ Define intents
  • πŸ”€ Provide variations in your bot's responses
  • 🌟 Set up a custom slot type
  • 🀝 Connect your chatbot with AWS Lambda
  • 🚁 Set up context carryover between intents

You're on project FIVE πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–

In this final part, you'll create an intent that lets you transfer money between accounts and learn about a handy service called AWS CloudFormation.

Want a complete demo of how to do this project, from start to finish? Check out our 🎬 walkthrough with Maya 🎬

If you're up for a bit of a challenge, quiz yourself on the key concepts up ahead in this project.

This project is part of a series:

  1. Part 1: Build a Chatbot with Amazon Lex
  2. Part 2: Add Custom Slots to a Lex Chatbot
  3. Part 3: Connect Amazon Lex with Lambda
  4. Part 4: Save User Info with a Lex Chatbot

Before we start...

It's always good to understand exactly what you're here to do.

Set up a new Lex chatbot

Let's create a new BankerBot by just repeating Parts 1 and 2 of this series.

Note

Repeating Parts 3 and 4 of this series is OPTIONAL

You can absolutely still add them for a complete BankerBot with all the features you've learnt (we'd definitely recommend it!) πŸ₯³

Once you're finished, you should have...

  • A new Lex chatbot called BankerBot.
  • WelcomeIntent set up.
  • FallbackIntent customised, i.e., your BankerBot says a customised error message if it doesn't understand the user's input.
  • CheckBalance set up with your custom slot type called accountType.
  • [OPTIONAL] Random bank balance figures returned to you when you check your balance.
  • [OPTIONAL] The ability to check another account balance without having to give your birthday again.

We'll need to repeat the steps from the last two projects of this series to set up BankerBot's basic functionalities.

Have you completed Parts 1-4 of the Lex Series?

Yes, and I've deleted my bot

Challenge yourself to complete this in less than 10 minutes. Now that you've done this before, you should be a lot more familiar with the steps involved πŸ˜‰

Once you're all set up, you should have... - [ ] A new Lex chatbot called BankerBot. - [ ] WelcomeIntent set up. - [ ] FallbackIntent customised, i.e., your BankerBot says a customised error message if it doesn't understand the user's input. - [ ] CheckBalance set up with your custom slot type called accountType. - [ ] [OPTIONAL] Random bank balance figures returned to you when you check your balance. - [ ] [OPTIONAL] The ability to check another account balance without having to give your birthday again.

Yes, and I have my bot

Wooh! Let's gooo! πŸ”₯

No, I haven't done it yet!

No worries - you're in good hands!

Once you're finished, you should have:

  • A new Lex chatbot called BankerBot.
  • WelcomeIntent set up.
  • FallbackIntent customised, i.e., your BankerBot says a customised error message if it doesn't understand the user's input.
  • CheckBalance set up with your custom slot type called accountType.
  • [OPTIONAL] Random bank balance figures returned to you when you check your balance.
  • [OPTIONAL] The ability to check another account balance without having to give your birthday again.

Let's get started!

  • Log in to your AWS Account.
  • Navigate to Amazon Lex (type Lex into your console's search bar).
  • Check your URL in your web browser - does it say ...console.aws.amazon.com/lexv2/...?
    • If you're not seeing "lexv2" in your URL, click on Switch to the new Lex V2 console link in your left-hand menu.
  • Select Create bot.
  • Select Create a blank bot.

Can't find the Create a blank bot option?

You might need to select the Traditional tab first to see it.

If you're stuck, ask the NextWork community!

  • For Bot name, enter BankerBot
  • For Description, enter Banker Bot to help customer check their balance and make transfers.
  • Under IAM permissions, select Create a role with basic Amazon Lex permissions. We'll be using it to call Lambda later!
  • Under Children’s Online Privacy Protection Act (COPPA), select No.
  • Under Idle session timeout, keep the default of 5 minutes.
  • Select Next.
  • Keep the language as English so you can explore Lex's full set of features in this project.
  • Under Voice interaction, click on the dropdown that says Danielle.
  • Click around different voice options to choose your favorite one! Two favorites in the NextWork community are Gregory and Ruth :D
  • For Intent classification confidence score threshold, keep the default value of 0.40.
  • Select Done.

Set Up WelcomeIntent

  • When your bot is created, you will automatically see a page called Intent: NewIntent.
  • Under Intent details, enter WelcomeIntent for the Intent name.
  • Add the description Welcoming a user when they say hello.
  • Scroll down to the Sample utterances panel.
  • Click the Plain Text button.
  • Copy the text below, which represent the user inputs (called utterances) that will trigger this intent, and paste it into the text window:
Hi
Hello
I need help
Can you help me?
  • Scroll down to Closing response, and expand the arrow for Response sent to the user after the intent is fulfilled.
  • In the Message field, enter the following message: Hi! I'm BB, the Banking Bot. How can I help you today?
  • Choose Save intent.
  • Choose Build, which is close to the top of the screen.
  • This can take 30 seconds - time for a stretch!
  • Choose Test.
  • The following dialog will pop up, and you can interact with the bot by entering your opening message.
  • Try various different phrases and see what comes up! It's also a good way to check that you've set up your chatbot without any errors:
    • Help me
    • Hiya
    • How are you
    • Good morning

Manage FallbackIntent

  • In your left hand navigation panel, choose FallbackIntent.
  • The default FallbackIntent message you saw just now ("Intent FallbackIntent is fulfilled") can be a little confusing.
  • Let's re-phrase that message so it's clearer to the user that your chatbot doesn't understand the user's request.
  • Scroll down to Closing responses.
  • Expand the arrow for Response sent to the user after the intent is fulfilled.
  • In the Message field, add the following text:‍ Sorry I am having trouble understanding. Can you describe what you'd like to do in a few words? I can help you find your account balance, transfer funds and make a payment.
  • You'll notice another arrow next to the label Variations - optional.
  • Expand the arrow.
  • Enter the following text: Hmm could you try rephrasing that? I can help you find your account balance, transfer funds and make a payment.
  • Add another variation! What is another response that the chatbot could use to get clarification if it doesn't understand the user's intent?
  • Choose Save intent.
  • Choose Build - time for another stretch!
  • Choose Test.
  • Let's test 2-3 message that failed in your last try - what do you see now?

Create the accountType Custom Slot

  • In the Amazon Lex console, choose Slot types in your left hand navigation panel.
  • Choose Add slot type.
  • From the dropdown, choose Add blank slot type.
  • Enter accountType for the Slot type name.
  • Choose Add.
  • This will bring up a large Slot types editor panel! Woooooo welcome.
  • In the Slot value resolution panel, choose Restrict to slot values.
  • Now let's add the three account types!
  • In the Values field, enter Checking
  • Select Add value, or just press Enter on your keyboard.
  • Do the same for Savings
  • Enter Credit, and add a few synonyms in the second field. Press ; on your keyboard after every time you add in a new one:
    • credit card
    • visa
    • mastercard
    • amex
    • american express
  • Choose Add value to finish up your work for Credit.
  • Choose Save slot type.

Create the CheckBalance intent

  • In your left hand navigation panel, head back to Intents.
  • Choose Add intent, then Add empty intent.
  • Enter CheckBalance as your intent name.
  • Choose Add.
  • Enter the following description in the Intent details panel: Intent to check the balance in the specified account type.
  • Scroll down to Sample utterances.
  • Switch to Plain Text and paste in the following utterances:
What’s the balance in my account?
Check my account balance
What’s the balance in my {accountType} account?
How much do I have in {accountType} ?
I want to check the balance
Can you help me with account balance?
Balance in {accountType}
  • Scroll down until you can see the Slots pane.
  • Choose Add slot button.
  • For slot's Name, enter accountType
  • For the Slot type, choose your custom slot value accountType - which you created in Part 1!
  • Enter the following for Prompts: For which account would you like your balance?
  • Choose Add.
  • Choose Add slot again.
  • Use these values for your next slot:
    • Name: dateOfBirth
    • Slot type: AMAZON.Date
    • Prompts: For verification purposes, what is your date of birth?
  • Choose Save intent.
  • Choose Build - have you been stretching while you wait? πŸ‘€
  • Choose Test.
  • Now let's chat with your new chatbot! Enter I want to check my balance please.
  • Then, follow Amazon Lex's prompts and enter an account type and birth date.
  • Now choose Inspect near the top of your chat window.
  • Oooo, the chatbot has already filled both slots - accountType and dateOfBirth - with information it now knows about you.
  • In your chat window, now enter What's the balance in my savings account?
  • This time, Amazon Lex will only prompt you for your date of birth, as it already knows that it should be the Savings account it checks.
  • Nice - you've just validated that your chatbot is set up and ready for more!

πŸ‘‰ OPTIONAL πŸ‘ˆ

Create Your AWS Lambda Function

  • Head to Lambda in your AWS Management Console.
  • Choose Author from scratch.
  • Function name - BankingBotEnglish
  • Runtime - Python 3.12, or a later version of Python3 if v3.12 is not available.
  • Select Create function.
  • Scroll down to the Function code section.
  • Double-click on lambda_function.py on the left-hand file browser.
  • Download the following source code file: ⬇️ BankingBotEnglish NextWork.py
  • Copy the downloaded code, and paste it in your text editor - it should completely replace any placeholder code that was in the example code fragment!
  • Choose Deploy, and your Lambda function is now all set up!

πŸ‘‰ OPTIONAL πŸ‘ˆ

Connect AWS Lambda with Amazon Lex

  • Head back to your Amazon Lex console.
  • Select BankerBot.
  • On the left-hand menu, choose Aliases.
  • Choose the default TestBotAlias.
  • From the Languages panel, select English (US).
  • Ooo how perfect - a Lambda function panel pops up. This panel lets you associate a Lambda function to this TestBotAlias version of your bot.
  • For Source, choose your Lambda function BankingBotEnglish.
  • Leave the Lambda function version or alias field at the default $LATEST.
  • Choose Save.

πŸ‘‰ OPTIONAL πŸ‘ˆ

Connect your CheckBalance intent with your Lambda function

The Lambda function is now ready to work on the BankingBot intents βœ…, but we still have to tell Amazon Lex which intent will actually use the Lambda function.

Time to make a direct connection between a specific intent with the Lambda function!

  • Navigate to your CheckBalance intent.
  • Scroll down to fulfillment panel.
  • Expand the On successful fulfillment bubble.
  • Choose Advanced options.
  • Under the fulfillment Lambda code hook panel, check the checkbox next to Use a Lambda function for fulfillment.
  • Choose Update options.
  • Choose Save intent.
  • Choose Build - time for another stretch!
  • Choose Test.
  • Ask for the balance of any of your accounts - your bot should now be able to return (random) bank balance figures!

πŸ‘‰ OPTIONAL πŸ‘ˆ

Create an output context from CheckBalance

  • In your CheckBalance intent page, scroll down to the Contexts panel.
  • Under the Output contexts drop-down, choose New context tag.

What are context tags?

Context tags in Amazon Lex are used to store and check for specific information across different parts of a conversation. They help save the user from having to repeat certain information

There are two types of context tags in Amazon Lex:

  1. Output context tag: This tells the chatbot to remember certain details after an intent is finished, so other parts of the conversation can use this stored information later. For example, the account type from BalanceCheck could be saved and reused
  2. Input context tag: This checks if specific details are already available before an intent activates. For example, FollowupCheckBalance will check if this conversation already has the user's date of birth saved somewhere, so it won't need to ask for that information again.
  • Name your new context contextCheckBalance
  • Set up the timeout for 5 turns, or 90 seconds. We will keep this short so your chatbot doesn't remember a user's birthday for too long (which might become a security risk).
  • Choose Add.
  • Choose Save intent.
  • Choose Build - time for another stretch!
  • Choose Test.
  • Check that the bot still operates the same as usual - i.e., no errors were set up as a result of the context tag!

πŸ‘‰ OPTIONAL πŸ‘ˆ

Create the FollowupCheckBalance intent

Time to create a new intent!

  • From your left hand navigation panel, head back to the Intents page.
  • Choose Add intent.
  • Choose Add empty intent.
  • Use the following properties to set up your next intent:
    • Name: FollowupCheckBalance
    • Description: Intent to allow a follow-up balance check request without authentication.
    • Input context: contextCheckBalance
    • Sample utterances:
How about my {accountType} account?
What about {accountType} ?
And in {accountType} ?
  • Add a new slot:
    • Name: accountType
    • Prompt: For which account would you like your balance?
    • Slot type: accountType
  • Add another new slot:
    • Name: dateOfBirth
    • Prompt: For verification purposes, what is your date of birth?
    • Slot type: AMAZON.Date
  • Choose Save intent.

πŸ‘‰ OPTIONAL πŸ‘ˆ

Implement Context Carryover

We've now set up the structure for the FollowupCheckBalance intent... But do you sense anything missing? 🧐

We still need to tell the FollowupCheckBalance intent where to find the user's date of birth information from the CheckBalance intent! Let's do that now.

  • Still in your FollowupCheckBalance intent page, expand the dateOfBirth slot.
  • Choose Advanced options.
  • Scroll all the way down to the Default values panel.
  • This panel lets us create default values for the intent's slots.
  • Enter #contextCheckBalance.dateOfBirth

What does #contextCheckBalance.dateOfBirth mean?

This tells Amazon Lex that the input context contextCheckBalance should have the value of dateOfBirth in CheckBalance.

  • Choose Add default value.
  • Choose Update slot.
  • Head to the Fulfillment pane to make sure the Lambda function is also connected to this intent (so random balances are still being returned to the user).
  • Expand On successful fulfillment.
  • Choose Advanced options.
  • Head to the Fulfillment Lambda code hook panel.
  • Select the checkbox to enable a fulfillment Lambda for this intent.
  • Choose Update options.
  • Choose Save intent.
  • Choose Build - time for another stretch!
  • Choose Test.
  • In your test, ask for a balance in your account - activate the CheckBalance intent first.
  • Then, the context for date of birth will be carried over to the FollowupCheckBalance intent.
  • Wooo!! Your bot now uses the context from your first check balance request, and doesn't ask for your birthday again for your second request.

Woooo set up DONE! You've breeeeeezed through those first four projects - nice work πŸ’ͺ

Now let's level up this chatbot! Get ready to:

  • 🚞 Configure multiple slots with a shared slot type.
  • πŸ‘ Implement a confirmation prompt.
  • 🎨 Use the conversation flow and visual builder.
  • ☁️ Automate bot deployment with CloudFormation.

Create the new TransferFunds intent

Our users can check their account balance now, but what about transferring money between accounts?

This is quite a fun to set up - we haven't had TWO account types pop up in the same intent before.

In this step, get ready to:

  • Set up a new intent that uses two accountType slots.
  • Create a new empty intent with the following properties:
    • Name: TransferFunds
    • Description: Help user transfer funds between bank accounts
  • Sample utterances:
Can I make a transfer?
I want to transfer funds
I'd like to transfer {transferAmount} from {sourceAccountType} to {targetAccountType}
Can I transfer {transferAmount} to my {targetAccountType}
Would you be able to help me with a transfer?
Need to make a transfer
  • Slots: add a new slot called sourceAccountType, with the prompt Which account would you like to transfer from? and the slot type accountType.
  • Slot: add another new slot called targetAccountType, with the prompt Which account are you transferring to? and the slot type accountType.
  • Slot: add another new slot called transferAmount, with the prompt How much money would you like to transfer? and the slot type AMAZON.Number.

Two of my slots have the same slot type!

It's totally possible for multiple slots to have the same slot type.

When two slots have the same slot type, it becomes important that you're using clear slot names, like sourceAccountType and targetAccountType, to make it easy to identify their differences.

  • We now want to add ✨confirmation prompts✨

What are confirmation prompts?

Confirmation prompts typically repeat back information for the user to confirm. e.g. "Are you sure you want to do x?" If the user confirms the intent, the bot fulfills the intent

If the user declines, then the bot responds with a decline response that you set up.

  • Scroll to the Confirmation panel.
  • In the Confirmation prompt panel, enter the following:
    • Got it. So we are transferring {transferAmount} from {sourceAccountType} to {targetAccountType}. Can I go ahead with the transfer?
  • In Decline response, enter:
    • The transfer has been cancelled.
  • Scroll to the Closing response pane, and add this to the Message field:
    • The transfer is complete. {transferAmount} should now be available in your {targetAccountType} account.
  • Now we're ready for testing! Choose Save intent.
  • Choose Build - time for another question!
  • Choose Test.
  • Now let's test out your chatbot! Ask your chatbot: I'd like to transfer money.
  • Complete the conversation with your bot!
  • Next, let's ask your chatbot something else... I'd like to transfer $1000 to my savings account.
  • The second conversation will be much shorter - you've passed on values for transferAmount and targetAccountType within your utterance!

Cool features in Amazon Lex

Great work setting up TransferFunds - that was your final intent for this chatbot series!

Right before we wrap up BankerBot, let's check out two cool features that can boost how quickly you'll build your next Lex chatbot πŸ’¨

In this step, get ready to:

  • Explore Lex's conversation flow feature.
  • Explore Lex's visual builder feature.

Conversation flow

  • Scroll to the very top of this intent's page.
  • Head to the Conversation flow panel.
  • Expand the arrow to see an example conversation flow πŸ‘οΈπŸ‘„πŸ‘οΈ

Oooo so what's the conversation flow feature for?

  1. This flow will update as you continue editing this intent.
  2. It shows every step in a conversation in a logical, chronological order.
  3. You'll also see some blank 'ghost like' responses. These are recommendations for what you could add to your Intent set up and they're clickable!
  4. If you click on the chat bubble, you'll get taken to an edit screen.

We won't be adding any of these to keep our chatbot simple for today, but it's a pretty handy tool if you're ever creating your own chatbot πŸ˜‰

Visual builder

  • Now look at the bottom bar of your screen.
  • Select Visual builder.
  • Now look at that! This is a visual representation of the intent you have just built.

In the future, you could use the Visual builder to build your intent from scratch (not just view the flow itself)!

We won't be doing this today (unless you're unlocking today's secret mission 🀫), but it's definitely a fun way to create chatbots.

Deploy your bot in seconds

Oh wait, another step? I've just deleted my bot!

No problems there - you're supposed to start this step from ground zero!

Now that you've created BankerBot again and again using the Amazon Lex console, you might be wondering... is there any way we could've set things up faster?

Do I really have to go through all the console pages and set up every intent, one by one, each time?

Engineers and teams think about how they can be more efficient in the way they develop and deploy things all the time. This means it's very valuable to know how to automate manual processes like how we've been setting up BankerBot.

πŸ₯ Introducing... AWS CloudFormation!

What is AWS CloudFormation?

AWS CloudFormation is a service that gives you an easy way to create and set up AWS resources.

It's an infrastructure as code service - meaning you will use a file that describes all the resources you want to create and their dependencies as code. Then, you can use that template to create, update, and delete the entire stack of resources you described, instead of managing your resources individually

CloudFormation is a super time saver. Let's give it a try with our BankerBot!

In this step, get ready to...

  • Use CloudFormation to deploy BankerBot in seconds.
  • Resolve connection issues with your deployed bot.
  • Here's the CloudFormation template you'll be using today! πŸ‘‰ Download this: nextwork-banker-bot.yaml
  • Open up the file on your laptop and give it a read - can you recognize its content?
  • Here's an excerpt that shows you how the CheckBalance and FollowupCheckBalance intents would be described in a CloudFormation template!
  • Next, let's deploy the CloudFormation template and see it at work!
  • Head to CloudFormation in your AWS Console.
  • Choose Create stack.
  • Choose Choose an existing template.
  • Choose Upload a template file.
  • Upload your CloudFormation template!
  • Choose Next.
  • For Stack name, you can enter nextwork-banker-bot
  • Choose Next.
  • Scroll to the bottom and select the checkboxes under Capabilities and transforms.
  • Choose Next again! We can skip Stack configuration in this simple implementation.
  • Choose Submit.
  • Your stack might take around 5 minutes to create. Wait until the status of your Stacks page says CREATE_COMPLETE.
  • Now let's check out CloudFormation's beautiful work!
  • Head to your Amazon Lex console, and you'll notice that your bot is all created and ready for testing already.
  • Click into banker-bot-BankerBot.
  • Select Intents from your left-hand navigation menu.
  • Connect your TestBot Alias with a Lambda function. Select the one with V2 in the name.
  • Select Save.
  • Let's chat with our new chatbot! Use Version 1 of your chatbot.
  • You'll notice that it mostly functions just like our previous chatbot, but hmmm.. do you get this error too when trying to activate the CheckBalance intent?

Why am I getting this error?

This is happening because the permissions in the AWS Lambda function are a little funky, so it's not passing the values back to your chatbot πŸ˜΅πŸ’«

(Psst... you’re doing an advanced part of this project, this next part is a bit tougher than the other steps! Keep it up and see how you go with this.)

Try troubleshooting this error by:

  • Creating and deploying a NEW Lambda function:
    • Function name - BankingBotEnglish
    • Runtime - Python 3.12, or a later version of Python3 if v3.12 is not available.
    • Inserting the code for BankingBotEnglish NextWork.py
  • Redirecting your Version 1 Alias to connect with that new Lambda function instead.

Does CheckBalance work after doing that?

If it doesn’t and you get hit with a 🚨 denied access 🚨 error, do you think you can challenge yourself to:

  • Find the Permissions tab in your new Lambda function
  • Under the Resource-based policy statements, select Add permissions. Let's create a new Resource-based policy statement that gives your chatbot aliases access to your new function.
  • Under the edit policy statement panel, select AWS service and enter the following details:
    • Service: Other
    • Statement ID: my-custom-permission-amazonlexchatbot
    • Principal: lexv2.amazonaws.com
    • Source name: find the ARN from the error message (eg. arn:aws:lex:ap-southeast-2:640168412593:bot-alias/*).
    • Action: lamdaInvokeFunction
  • Does your edit policy statement panel look like this?
  • Select Save.
  • Test whether your CheckBalance intent works after giving this a go!
  • Wooooohoooo! Doesn't feel amazing to fix an error?
  • Now that we're done, it's time to delete our bot again.

Delete your CloudFormation stack

  • Head back to your CloudFormation console.
  • Select the same stack that you created.
  • In the Stack info pane, choose Delete.
  • Choose Delete again. It takes a few minutes, but eventually the Stack list will return to 0 as you refresh your console.

Do I still need to delete the Lex chatbot and Lambda function separately?

The great thing about deleting a CloudFormation stack is that all the resources it created will get cleaned up at the same time for you - no need to search around your console and delete resources one by one!

  • Still, check your Lambda console to delete any functions you've created manually.

CloudWatch log group

Next, delete your CloudWatch log group. It wasn't created as a part of your CloudFormation stack, but it is a byproduct of testing your chatbot.

  • Head to your CloudWatch console.
  • Select the checkbox next to your CloudWatch log groups.
  • In the Actions dropdown, select Delete log group(s).

Secret mission

Welcome to your 🀫 exclusive 🀫 secret mission!

Your mission, should you choose to accept it, is to use the visual builder to improve TransferFunds.

πŸ’Ž In this secret mission, get ready to:

  • Break down the TransferFunds flow in the visual builder.
  • Add a new step to TransferFunds using the visual builder.
  • Showcase your secret mission in your project documentation.

Using the Visual Builder

Delete Your Resources!

Delete Your Resources!

Make sure you delete all your resources to avoid getting charged. This is a super important task for every single project you set up. Don't keep your resources in your account if you'll wait to come back to this series on another day.

Do you think you can delete the resources you've created today?

  • Lex Bot (your BankerBot).
  • Delete your Lambda function.
  • Delete your Lambda function's log files.

Yep, all done.

Fantastic! It's the home stretch!

I know, but also, I don't...

If you're feeling stuck (we've all been there!), here's a little guide:

Delete your BankerBot

  • Head to your Amazon Lex console.
  • Choose Bots on the left-hand sidebar.
  • Choose the circle radio button next to BankerBot.
  • Choose Delete from your Action drop-down.
  • Choose Delete.

Delete your Lambda function

  • Head to your AWS Lambda console.
  • Choose Functions on the left-hand sidebar.
  • Choose the circle radio button next to BankingBotEnglish.
  • Choose Delete from your Action drop-down.
  • Choose Delete.

Delete your Lambda function log files

  • Head to CloudWatch in your AWS console.
  • Choose Logs on the left-hand sidebar.
  • Choose Log groups.
  • Select the checkbox next to BankingBot.
  • Choose Delete log group(s) in the Actions menu.
  • Choose Delete.

What are Lambda function log files?

These log files are records of events that happen when AWS Lambda functions are running. These logs include details like errors, warnings, and informational messages that help developers understand how their functions are performing.

In this project, log files have been produced each time your Lambda function was triggered i.e., when CheckBalance gives you a bank balance number.

The logs are stored in CloudWatch, an AWS service used for monitoring and managing all the log data across all your services.

Nice Work!

Nice Work!

You've just completed today's project and set up your very own chatbot with multiple slots AND deployed it all in seconds! πŸ™Œ

SO IS THAT THE ENTIRE AMAZON LEX CHATBOT SERIES DONE?!

Woohooooo!! You are an absolute legend and should be very proud of yourself. That was not easy work but you gave it a go, did your best, and absolutely crushed it.

Congratulations on making it to the end of the series, you've absolutely outdone yourself with this one.

To wrap things up, today you've learnt how to:

  • 🚞 Configure multiple slots with a shared slot type: You set up two different slots, sourceAccountType and targetAccountType, that both utilize the same underlying accountType slot. This streamlines data handling in your bot.
  • πŸ‘ Implement a confirmation prompt: You've added a confirmation prompt that repeats the transaction details back to the user for verification.
  • 🎨 Use the conversation flow and visual builder: You've cracked open two awesome features that you could bring into the next time you create a Lex chatbot!
  • ☁️ Automate bot deployment with CloudFormation: You used AWS CloudFormation to automate the deployment of your banking bot. This not only saved time but also made sure all resources were correctly configured and linked! Awesome work deploying infrastructure using code.

Ready to quiz yourself? You got this! πŸ’ͺ

And that's on TOP of all the other amazing skills you've learnt in this series...

πŸ₯³ In Project 1 (WelcomeIntent, FallbackIntent), you learnt how to:

  • Define a basic intent.
  • Create lists of utterances.
  • Handling failures i.e. FallbackIntent.
  • Define a MessageGroup to provide a semi-random response.
  • Build and test your bot using text and speech.

🀩 In Project 2 (CheckBalance), you learnt how to:

  • Define a custom slot type.
  • Associate custom and built-in slots to your intent.
  • Parse slot values from the initial utterance.

🀯 In Project 3 (Lambda function), you learnt how to:

  • Set up a Lambda function
  • Integrate the Lambda function with your chatbot's alias.
  • Use code hooks to perform the final fulfilment step of the intent.

πŸ€ͺ In Project 4 (FollowupCheckBalance), you learnt how to:

  • Set up context carryover of slot values from one intent to the next.

That's a huuuuuuuuuuuge achievement! Thanks for joining us in this series, and we'll see you in the next one. 🀝

p.s. Does it say "Still tasks to complete!" at the bottom of the screen?

This means you still have screenshots left to upload, or questions left to answer!

  1. Press Ctrl+F (Windows) or Command+F (Mac) on your keyboard.
  2. Search for the text Return to later.
  3. Jump straight to your incomplete tasks!
  4. πŸ™‹β€β™€οΈ Still stuck? Ask the community!