Menu
Amazon Lex
Developer Guide

Step 1: Publish the Slot Type (AWS CLI)

Before you can publish a version of any intents that use a slot type, you must publish a version of that slot type. In this case, you publish the FlowerTypes slot type.

Note

The following AWS CLI example is formatted for Unix, Linux, and macOS. For Windows, change "\$LATEST" to $LATEST.

To publish a slot type (AWS CLI)

  1. In the AWS CLI, get the latest version of the slot type:

    Copy
    aws lex-models get-slot-type --name FlowerTypes --slot-type-version "\$LATEST"

    The response from Amazon Lex follows. Record the checksum for the current revision of the $LATEST version.

    {
        "enumerationValues": [
            {
                "value": "tulips"
            }, 
            {
                "value": "lilies"
            }, 
            {
                "value": "roses"
            }
        ], 
        "name": "FlowerTypes", 
        "checksum": "checksum", 
        "version": "$LATEST", 
        "lastUpdatedDate": timestamp, 
        "createdDate": timestamp, 
        "description": "Types of flowers to pick up"
    }
  2. Publish a version of the slot type. Use the checksum that you recorded in the previous step.

    Copy
    aws lex-models create-slot-type-version --name FlowerTypes --checksum "checksum"

    The response from Amazon Lex follows. Record the version number for the next step.

    {
        "version": "1", 
        "enumerationValues": [
            {
                "value": "tulips"
            }, 
            {
                "value": "lilies"
            }, 
            {
                "value": "roses"
            }
        ], 
        "name": "FlowerTypes", 
        "createdDate": timestamp, 
        "lastUpdatedDate": timestamp, 
        "description": "Types of flowers to pick up"
    }

Next Step

Step 2: Publish the Intent (AWS CLI)

On this page: