

End of support notice: On September 15, 2025, AWS will discontinue support for Amazon Lex V1. After September 15, 2025, you will no longer be able to access the Amazon Lex V1 console or Amazon Lex V1 resources. If you are using Amazon Lex V2, refer to the [Amazon Lex V2 guide](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html) instead. . 

# Built-in Slot Types
<a name="howitworks-builtins-slots"></a>

Amazon Lex supports built-in slot types that define how data in the slot is recognized and handled. You can create slots of these types in your intents. This eliminates the need to create enumeration values for commonly used slot data such as date, time, and location. Built-in slot types do not have versions. 


| Slot Type | Short Description | Supported Locales | 
| --- | --- | --- | 
| [AMAZON.Airport](built-in-slot-airport.md) | Recognizes words that represent an airport. | All locales | 
| [AMAZON.AlphaNumeric](built-in-slot-alphanumeric.md) | Recognizes words made up of letters and numbers. | All locales except Korean (ko-KR) | 
| [AMAZON.City](built-in-slot-city.md) | Recognizes words that represent a city. | All locales | 
| [AMAZON.Country](built-in-slot-country.md) | Recognizes words that represent a country. | All locales | 
| [AMAZON.DATE](built-in-slot-date.md) | Recognizes words that represent a date and converts them to a standard format. | All locales | 
| [AMAZON.DURATION](built-in-slot-duration.md) | Recognizes words that represent duration and converts them to a standard format. | All locales | 
| [AMAZON.EmailAddress](built-in-slot-email.md) | Recognizes words that represent an email address and converts them into a standard email address. | All locales | 
| [AMAZON.FirstName](built-in-slot-first-name.md) | Recognizes words that represent a first name. | All locales | 
| [AMAZON.LastName](built-in-slot-last-name.md) | Recognizes words that represent a last name. | All locales | 
| [AMAZON.NUMBER](built-in-slot-number.md) | Recognizes numeric words and converts them into digits. | All locales | 
| [AMAZON.Percentage](built-in-slot-percent.md) | Recognizes words that represent a percentage and converts them to a number and a percent sign (%). | All locales | 
| [AMAZON.PhoneNumber](built-in-slot-phone.md) | Recognizes words that represent a phone number and converts them into a numeric string. | All locales | 
| [AMAZON.SpeedUnit](built-in-slot-speed.md) | Recognizes words that represent a speed unit and converts them into a standard abbreviation. | English (US) (en-US) | 
| [AMAZON.State](built-in-slot-state.md) | Recognizes words that represent a state. | All locales | 
| [AMAZON.StreetName](built-in-slot-street-name.md) | Recognizes words that represent a street name. | All locales except English (US) (en-US) | 
| [AMAZON.TIME](built-in-slot-time.md) | Recognizes words that indicate times and converts them into a time format. | All locales | 
| [AMAZON.WeightUnit](built-in-slot-weight.md) | Recognizes words that represent a weight unit and converts them into a standard abbreviation  | English (US) (en-US) | 

**Note**  
For the English (US) (en-US) locale, Amazon Lex supports slot types from the Alexa Skill Kit. For a list of available built-in slot types, see the [Slot Type Reference](https://developer.amazon.com/docs/custom-skills/slot-type-reference.html) in the Alexa Skills Kit documentation.   
Amazon Lex doesn't support the `AMAZON.LITERAL` or the `AMAZON.SearchQuery` built-in slot types. 

# AMAZON.Airport
<a name="built-in-slot-airport"></a>

Provides a list of airports. Examples include:
+ John F. Kennedy International Airport
+ Melbourne Airport

# AMAZON.AlphaNumeric
<a name="built-in-slot-alphanumeric"></a>

Recognizes strings made up of letters and numbers, such as **APQ123**.

This slot type is not available in the Korean (ko-KR) locale.

You can use the `AMAZON.AlphaNumeric` slot type for strings that contain: 
+ Alphabetical characters, such as **ABC**
+ Numeric characters, such as **123**
+ A combination of alphanumeric characters, such as **ABC123**

You can add a regular expression to the `AMAZON.AlphaNumeric` slot type to validate values entered for the slot. For example, you can use a regular expression to validate:
+ United Kingdom or Canadian postal codes
+ Driver's license numbers
+ Vehicle identification numbers

Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:
+ A-Z, a-z
+ 0-9

Amazon Lex also supports Unicode characters in regular expressions. The form is `\uUnicode`. Use four digits to represent Unicode characters. For example, `[\u0041-\u005A]` is equivalent to [A-Z].

The following regular expression operators are not supported:
+ Infinite repeaters: \$1, \$1, or \$1x,\$1 with no upper bound.
+ Wild card (.)

The maximum length of the regular expression is 300 characters. The maximum length of a string stored in an AMAZON.AlphaNumeric slot type that uses a regular expression is 30 characters.

The following are some example regular expressions.
+ Alphanumeric strings, such as **APQ123** or **APQ1**: `[A-Z]{3}[0-9]{1,3}` or a more constrained `[A-DP-T]{3} [1-5]{1,3}`
+ US Postal Service Priority Mail International format, such as **CP123456789US**: `CP[0-9]{9}US`
+ Bank routing numbers, such as **123456789**: `[0-9]{9}`

To set the regular expression for a slot type, use the console or the [PutSlotType](API_PutSlotType.md) operation. The regular expression is validated when you save the slot type. If the expression isn't valid, Amazon Lex returns an error message.

When you use a regular expression in a slot type, Amazon Lex checks input to slots of that type against the regular expression. If the input matches the expression, the value is accepted for the slot. If the input does not match, Amazon Lex prompts the user to repeat the input. 

# AMAZON.City
<a name="built-in-slot-city"></a>

Provides a list of local and world cities. The slot type recognizes common variations of city names. Amazon Lex doesn't convert from a variation to an official name.

Examples:
+ New York
+ Reykjavik
+ Tokyo
+ Versailles

# AMAZON.Country
<a name="built-in-slot-country"></a>

The names of countries around the world. Examples:
+ Australia
+ Germany
+ Japan
+ United States
+ Uruguay

# AMAZON.DATE
<a name="built-in-slot-date"></a>

Converts words that represent dates into a date format.

The date is provided to your intent in ISO-8601 date format. The date that your intent receives in the slot can vary depending on the specific phrase uttered by the user.
+ Utterances that map to a specific date, such as "today," "now," or "November twenty-fifth," convert to a complete date: `2020-11-25`. This defaults to dates *on or after* the current date.
+ Utterances that map to a specific week, such as "this week," or "next week," convert to the date of the first day of the week. In ISO-8601 format, the week starts on Monday and ends on Sunday. For example, if today is 2020-11-25, "next week" converts to `2020-11-30`.
+ Utterances that map to a month, but not a specific day, such as "next month," convert to the last day of the month. For example, if today is 2020-11-25, "next month" converts to `2020-12-31`.
+ Utterances that map to a year, but not a specific month or day, such as "next year," convert to the last day of the following year. For example, if today is 2020-11-25, "next year" converts to `2021-12-31`.

# AMAZON.DURATION
<a name="built-in-slot-duration"></a>

Converts words that indicate durations into a numeric duration.

The duration is resolved to a format based on the [ISO-8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations), `PnYnMnWnDTnHnMnS`. The `P` indicates that this is a duration, the `n` is a numeric value, and the capital letter following the `n` is the specific date or time element. For example, `P3D` means 3 days. A `T` is used to indicate that the remaining values represent time elements rather than date elements.

Examples:
+ "ten minutes": `PT10M`
+ "five hours": `PT5H`
+ "three days": `P3D`
+ "forty five seconds": `PT45S`
+ "eight weeks": `P8W`
+ "seven years": `P7Y`
+ "five hours ten minutes": `PT5H10M`
+ "two years three hours ten minutes": `P2YT3H10M`

# AMAZON.EmailAddress
<a name="built-in-slot-email"></a>

Recognizes words that represent an email address provided as username@domain. Addresses can include the following special characters in a user name: underscore (\$1), hyphen (-), period (.), and the plus sign (\$1).

# AMAZON.FirstName
<a name="built-in-slot-first-name"></a>

Commonly used first names. This slot type recognizes both formal names and informal nicknames. The name sent to your intent is the value sent by the user. Amazon Lex doesn't convert from the nick name to the formal name.

For first names that sound alike but are spelled differently, Amazon Lex sends your intent a single common form.

In the English (US) (en-US) locale, use the slot name AMAZON.US\$1First\$1Name.

Examples:
+ Emily
+ John
+ Sophie

# AMAZON.LastName
<a name="built-in-slot-last-name"></a>

Commonly used last names. For names that sound alike that are spelled differently, Amazon Lex sends your intent a single common form.

In the English (US) (en-US) locale, use the slot name AMAZON.US\$1Last\$1Name.

Examples:
+ Brosky
+ Dasher
+ Evers
+ Parres
+ Welt

# AMAZON.NUMBER
<a name="built-in-slot-number"></a>

Converts words or numbers that express a number into digits, including decimal numbers. The following table shows how the `AMAZON.NUMBER` slot type captures numeric words.


| Input | Response | 
| --- | --- | 
| one hundred twenty three point four five | 123.45 | 
| one hundred twenty three dot four five | 123.45 | 
| point four two | 0.42 | 
| point forty two | 0.42 | 
| 232.998 | 232.998 | 
| 50 | 50 | 

# AMAZON.Percentage
<a name="built-in-slot-percent"></a>

Converts words and symbols that represent a percentage into a numeric value with a percent sign (%).

If the user enters a number without a percent sign or the word "percent," the slot value is set to the number. The following table shows how the `AMAZON.Percentage` slot type captures percentages.


| Input | Response | 
| --- | --- | 
| 50 percent | 50% | 
| 0.4 percent | 0.4% | 
| 23.5% | 23.5% | 
| twenty five percent | 25% | 

# AMAZON.PhoneNumber
<a name="built-in-slot-phone"></a>

Converts the numbers or words that represent a phone number into a string format without punctuation as follows.


| Type | Description | Input | Result | 
| --- | --- | --- | --- | 
| International number with leading plus (\$1) sign | 11-digit number with leading plus sign. | \$161 7 4445 1061 \$11 (509) 555-1212 | `+61744431061` `+15095551212` | 
| International number without leading plus (\$1) sign | 11-digit number without leading plus sign | 1 (509) 555-1212 61 7 4445 1061 | `15095551212` `61744451061` | 
| National number | 10-digit number without international code | (03) 5115 4444 (509) 555-1212 | `0351154444` `5095551212` | 
| Local number | 7-digit phone number without an international code or an area code | 555-1212 | 5551212 | 

# AMAZON.SpeedUnit
<a name="built-in-slot-speed"></a>

Converts words that represent speed units into the corresponding abbreviation. For example, "miles per hour" is converted to `mph`.

This slot type is available only in the English (US) (en-US) locale.

The following examples show how the `AMAZON.SpeedUnit` slot type captures speed units.


| Speed unit | Abbreviation | 
| --- | --- | 
|  miles per hour, mph, MPH, m/h  | mph | 
|  kilometers per hour, km per hour, kmph, KMPH, km/h  | kmph | 
|  meters per second, mps, MPS, m/s  | mps | 
| nautical miles per hour, knots, knot | knot | 

# AMAZON.State
<a name="built-in-slot-state"></a>

The names of geographical and political regions within countries. 

Examples:
+ Bavaria
+ Fukushima Prefecture
+ Pacific Northwest
+ Queensland
+ Wales

# AMAZON.StreetName
<a name="built-in-slot-street-name"></a>

The names of streets within a typical street address. This includes just the street name, not the house number.

This slot type isn't available in the English (US) (en-US) locale.

Examples:
+ Canberra Avenue
+ Front Street
+ Market Road

# AMAZON.TIME
<a name="built-in-slot-time"></a>

Converts words that represent times into time values. Includes resolutions for ambiguous times. When a user enters an ambiguous time, Amazon Lex uses the `slotDetails` attribute of a Lambda event to pass resolutions for the ambiguous times to your Lambda function. For example, if your bot prompts the user for a delivery time, the user can respond by saying "10 o'clock." This time is ambiguous. It means either 10:00 AM or 10:00 PM. In this case, the value in the `slots` map is `null`, and the `slotDetails` entity contains the two possible resolutions of the time. Amazon Lex inputs the following into the Lambda function:

```
"slots": {
   "deliveryTime": null
},
"slotDetails": {
   "deliveryTime": {
      "resolutions": [
         {
            "value": "10:00"
         },
         {
            "value": "22:00"
         }
      ]
   }
}
```

When the user responds with an unambiguous time, Amazon Lex sends the time to your Lambda function in the `slots` attribute of the Lambda event and the `slotDetails` attribute is empty. For example, if your user responds to the prompt for a delivery time with "10:00 PM," Amazon Lex inputs the following into the Lambda function:

```
"slots": {
   "deliveryTime": "22:00"
}
```

For more information about the data sent from Amazon Lex to a Lambda function, see [Input Event Format](lambda-input-response-format.md#using-lambda-input-event-format).

# AMAZON.WeightUnit
<a name="built-in-slot-weight"></a>

Converts words that represent a weight unit into the corresponding abbreviation. For example, "kilogram" is converted to `kg`. 

This slot type is available only in the English (US) (en-US) locale.

The following examples show how the `AMAZON.WeightUnit` slot type captures weight units:


| Weight unit | Abbreviation | 
| --- | --- | 
| kilograms, kilos, kgs, KGS | kg | 
| grams, gms, gm, GMS, g | g | 
| milligrams, mg, mgs | mg | 
| pounds, lbs, LBS | lbs | 
| ounces, oz, OZ | oz | 
| tonne, ton, t | t | 
| kiloton, kt | kt | 