Amazon Lex
Developer Guide

Step 2: Create a Custom Slot Type (AWS CLI)

Create a custom slot type with enumeration values for the flowers that can be ordered. You use this type in the next step when you create the OrderFlowers intent. A slot type defines the possible values for a slot, or parameter, of the intent.

To create a custom slot type (AWS CLI)

  1. Create a text file named FlowerTypes.json. Copy the JSON code from FlowerTypes.json into the text file.

  2. Call the PutSlotType operation using the AWS CLI to create the slot type:

    aws lex-models put-slot-type --name FlowerTypes --cli-input-json file://FlowerTypes.json

    The response from the server is:

        "enumerationValues": [
                "value": "tulips"
                "value": "lilies"
                "value": "roses"
        "name": "FlowerTypes", 
        "checksum": "checksum", 
        "version": "$LATEST", 
        "lastUpdatedDate": timestamp, 
        "createdDate": timestamp, 
        "description": "Types of flowers to pick up"

Next Step

Step 3: Create an Intent (AWS CLI)

On this page: