swift-account-41358
08/19/2025, 6:38 PMaws.lex.V2modelsSlotType
TypeScript is happy with this:
const timePreferenceSlotType = new aws.lex.V2modelsSlotType("TimePreferenceSlotType", {
botId: bot.id,
botVersion: "DRAFT",
localeId: botLocale.localeId,
name: "TimePreference",
description: "Customer time and optimization preferences",
parentSlotTypeSignature: "AMAZON.AlphaNumeric",
valueSelectionSetting: {
resolutionStrategy: "TOP_RESOLUTION",
advancedRecognitionSettings: [{
audioRecognitionStrategy: "USE_SLOT_VALUES_AS_TRANSCRIPT",
}],
},
slotTypeValues: [
{
sampleValues: [{ value: "morning" }],
synonyms: [
{ value: "early" },
{ value: "AM" },
{ value: "before noon" },
{ value: "first thing" },
],
},
{
sampleValues: [{ value: "afternoon" }],
synonyms: [
{ value: "PM" },
{ value: "after lunch" },
{ value: "midday" },
{ value: "early afternoon" },
],
},
{
sampleValues: [{ value: "evening" }],
synonyms: [
{ value: "late" },
{ value: "end of day" },
{ value: "after work" },
{ value: "after 5" },
],
},
{
sampleValues: [{ value: "green" }],
synonyms: [
{ value: "eco-friendly" },
{ value: "environmental" },
{ value: "sustainable" },
{ value: "low carbon" },
{ value: "best availability" },
],
},
{
sampleValues: [{ value: "cheapest" }],
synonyms: [
{ value: "lowest cost" },
{ value: "best price" },
{ value: "discount" },
{ value: "save money" },
{ value: "budget" },
],
},
{
sampleValues: [{ value: "flexible" }],
synonyms: [
{ value: "any time" },
{ value: "whenever" },
{ value: "no preference" },
{ value: "doesn't matter" },
],
},
],
});
However, when deployed I get
TimePreferenceSlotType aws:lex:V2modelsSlotType
cannot encode resource inputs to call ValidateResourceConfig: objectEncoder failed on property "slot_type_values
": Expected an Object PropertyValue, found [] ("{[{map[sampleValues:{[{map[value:{morning}]}]} synonyms:{[{map[v
alue:{early}]} {map[value:{AM}]} {map[value:{before noon}]} {map[value:{first thing}]}]}]} {map[sampleValues:{[{
map[value:{afternoon}]}]} synonyms:{[{map[value:{PM}]} {map[value:{after lunch}]} {map[value:{midday}]} {map[val
ue:{early afternoon}]}]}]} {map[sampleValues:{[{map[value:{evening}]}]} synonyms:{[{map[value:{late}]} {map[valu
e:{end of day}]} {map[value:{after work}]} {map[value:{after 5}]}]}]} {map[sampleValues:{[{map[value:{green}]}]}
synonyms:{[{map[value:{eco-friendly}]} {map[value:{environmental}]} {map[value:{sustainable}]} {map[value:{low
carbon}]} {map[value:{best availability}]}]}]} {map[sampleValues:{[{map[value:{cheapest}]}]} synonyms:{[{map[val
ue:{lowest cost}]} {map[value:{best price}]} {map[value:{discount}]} {map[value:{save money}]} {map[value:{budge
t}]}]}]} {map[sampleValues:{[{map[value:{flexible}]}]} synonyms:{[{map[value:{any time}]} {map[value:{whenever}]
} {map[value:{no preference}]} {map[value:{doesn't matter}]}]}]}]}")
So it seems there’s a mismatch between what Pulumi defines and what AWS needs. Anyone had any joy with this or know a way around it?mammoth-restaurant-4670
08/19/2025, 7:08 PMswift-account-41358
08/19/2025, 7:15 PMmammoth-restaurant-4670
08/19/2025, 8:43 PMswift-account-41358
08/19/2025, 8:45 PMswift-account-41358
08/19/2025, 10:41 PMmammoth-restaurant-4670
08/19/2025, 10:50 PMswift-account-41358
08/19/2025, 10:52 PM