

There are more AWS SDK examples available in the [AWS Doc SDK Examples](https://github.com/awsdocs/aws-doc-sdk-examples) GitHub repo.

# Amazon Lex examples using SDK for Java 2.x
<a name="java_2_lex_code_examples"></a>

The following code examples show you how to perform actions and implement common scenarios by using the AWS SDK for Java 2.x with Amazon Lex.

*Scenarios* are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services.

Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.

**Topics**
+ [Scenarios](#scenarios)

## Scenarios
<a name="scenarios"></a>

### Building an Amazon Lex chatbot
<a name="cross_LexChatbotLanguages_java_2_topic"></a>

The following code example shows how to create a chatbot to engage your website visitors.

**SDK for Java 2.x**  
 Shows how to use the Amazon Lex API to create a Chatbot within a web application to engage your web site visitors.   
 For complete source code and instructions on how to set up and run, see the full example on [GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/usecases/creating_lex_chatbot).   

**Services used in this example**
+ Amazon Comprehend
+ Amazon Lex
+ Amazon Translate