By using AWS re:Post, you agree to the Terms of Use

Questions tagged with DevOps

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Lexbot not eliciting all slot values in conversation

I'm trying to automate the process of creating a lexbot that receives slot values and processes them in a lambda function. The creation of the bot and functions are completed and fine, when I check the amazon lex console, the bot has been created, the intents are correct and the slot elicitations are there. However, when I run the bot and type an utterance, the bot goes straight to fulfilment lambda function as opposed to asking for the other slot values. All the slots have the slot constraint 'required', I'm just not sure why they are not being elicited by the bot. I will attach the json response from list_slots below: ![json response of list slots](/media/postImages/original/IMzBaosX9_QYWsel9MzYy8tQ) Below I will attach images of the bot specifications from the console. ![slot values](/media/postImages/original/IM4GGdRJpRQgqML7zXFSxlCA) ![shows the lambda function is called on fulfillment](/media/postImages/original/IMdjLiIZ32TqyaBpVplSnN8Q) ![Example of test output](/media/postImages/original/IM6u9Bp-ruQ22K-CXsN43bzA) I will also attach the content of the boto3 request I used to create the the slot in the first place. ![Example of the boto3 request used to create the slot](/media/postImages/original/IMauJP2jvYRu6dPSBpUkKxEA) The following is an image of my intent, to show that the fulfilment code hook is enabled: ![Code that shows the creation of the intent](/media/postImages/original/IMkSN5QrZaSymUBAX29f0R7w) My question is, why is the bot not asking for the other slot values when all the configuration suggests it should do otherwise?
0
answers
0
votes
32
views
asked a month ago

update glue trigger via CDK code

Hi team, I'm trying to use CDK customResource to update EventBatchingCondition for a glue trigger( as this is not supported natively by cloudFormation) this my code : ``` new AwsCustomResource(this, "updateEventBatching", { policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE, }), onCreate: { service: "Glue", action: "updateTrigger", parameters: { Name: myGlueTrigger.name, //The name of the trigger to update. TriggerUpdate: { EventBatchingCondition: { BatchSize: "20", BatchWindow: "900", }, }, }, physicalResourceId: PhysicalResourceId.of( "updateEventBatching_id" ), }, onUpdate: { service: "Glue", action: "updateTrigger ", parameters: { Name: myGlueTrigger.name, //The name of the trigger to update. TriggerUpdate: { EventBatchingCondition: { BatchSize: "20" , BatchWindow: "300", }, }, }, physicalResourceId: PhysicalResourceId.of("updateEventBatching_id"), }, }); ``` I followed this article to grabe the service name, action, and parameters : https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Glue.html#updateTrigger-property when I try to deploy I have this error : not sure what if it's about the service action is not correct ? also I'm not sure what I should put in `physicalResourceId `parameter in this case, I just put a static string ``` node_modules\aws-cdk-lib\aws-iam\lib\policy-statement.js:1 "use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Effect=exports.PolicyStatement=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),group_1=require("./group"),principals_1=require("./principals"),postprocess_policy_document_1=require("./private/postprocess-policy-document"),util_1=require("./util"),ensureArrayOrUndefined=field=>{if(field!==void 0){if(typeof field!="string"&&!Array.isArray(field))throw new Error("Fields must be either a string or an array of strings");if(Array.isArray(field)&&!!field.find(f=>typeof f!="string"))throw new Error("Fields must be either a string or an array of strings");return Array.isArray(field)?field:[field]}};class PolicyStatement{constructor(props={}){this.action=new Array,this.notAction=new Array,this.principal={},this.notPrincipal={},this.resource=new Array,this.notResource=new Array,this.condition={},this._principals=new Array;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_PolicyStatementProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.constructor),error}for(const action of[...props.actions||[],...props.notActions||[]])if(!/^(\*|[a-zA-Z0-9-]+:[a-zA-Z0-9*]+)$/.test(action)&&!cdk.Token.isUnresolved(action))throw new Error(`Action '${action}' is invalid. An action string consists of a service namespace, a colon, and the name of an action. Action names can include wildcards.`);this.sid=props.sid,this.effect=props.effect||Effect.ALLOW,this.addActions(...props.actions||[]),this.addNotActions(...props.notActions||[]),this.addPrincipals(...props.principals||[]),this.addNotPrincipals(...props.notPrincipals||[]),this.addResources(...props.resources||[]),this.addNotResources(...props.notResources||[]),props.conditions!==void 0&&this.addConditions(props.conditions)}static fromJson(obj){const ret=new PolicyStatement({sid:obj.Sid,actions:ensureArrayOrUndefined(obj.Action),resources:ensureArrayOrUndefined(obj.Resource),conditions:obj.Condition,effect:obj.Effect,notActions:ensureArrayOrUndefined(obj.NotAction),notResources:ensureArrayOrUndefined(obj.NotResource),principals:obj.Principal?[new JsonPrincipal(obj.Principal)]:void 0,notPrincipals:obj.NotPrincipal?[new JsonPrincipal(obj.NotPrincipal)]:void 0}),errors=ret.validateForAnyPolicy();if(errors.length>0)throw new Error("Incorrect Policy Statement: "+errors.join(` ^ Error: Action 'glue:UpdateTrigger ' is invalid. An action string consists of a service namespace, a colon, and the name of an action. Action names can include wildcards. at new PolicyStatement (C:\xxxx\node_modules\aws-cdk-lib\aws-iam\lib\policy-statement.js:1:1371) at new AwsCustomResource (C:\xxxx\node_modules\aws-cdk-lib\custom-resources\lib\aws-custom-resource\aws-custom-resource.js:1:4109) at new CdkGlueEdwLoadStack (C:\xxxxxx\lib\cdk-glue-edw-load-stack.ts:634:5) at Object.<anonymous> (C:\xxxxx\bin\index.ts:115:1) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module.m._compile (C:\xxxxx\node_modules\ts-node\src\index.ts:1056:23) at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Object.require.extensions.<computed> [as .ts] (C:\xxxxx\node_modules\ts-node\src\index.ts:1059:12) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) ```
2
answers
0
votes
61
views
asked a month ago