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

Questions tagged with Developer Tools

Sort by most recent
  • 1
  • 12 / page

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
5
views
asked 8 hours ago

Does the AWS SDK for JavaScript V3 handle refresh of expired temporary credentials?

I am developing an application using Amazon Cognito User Pools and Identity Pools. My application uses: * the Cognito Hosted UI and authorization code grant to get an authorization code * a POST request to a standard `oauth2/token` endpoint to exchange the authorization code for an `id_token`, `access_token`, and `refresh_token` * the AWS SDK for JavaScript V3 `fromCognitoIdentityPool` method to exchange an `id_token` for temporary AWS credentials (which are used to allow users to access various AWS services) My question relates to the expiration and refresh of these temporary AWS credentials. The IAM user guide says [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html): > You must make sure that you get a new set of credentials before the old ones expire. In some SDKs, you can use a provider that manages the process of refreshing credentials for you; check the documentation for the SDK you're using. I am using the AWS SDK for JavaScript V3. I have searched through these resources without finding any reference to whether or not the SDK handles refreshing of temporary credentials: 1. [The API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html) 2. [The Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) 3. [Various code files from the repository](https://github.com/aws/aws-sdk-js-v3) I did find one tangential, ambiguous reference to credential expiration and refreshing on the page ["Using Amazon Cognito Identity to authenticate users"](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-browser-credentials-cognito.html) in the section named ***Switch to Authenticated User***. I think adding a section to this page about the details of temporary credentials refresh would be extremely helpful to developers. **Does the AWS SDK for JavaScript V3 handle refresh of expired temporary credentials? Where is this described in the documentation for the SDK?** If yes: * Does the SDK handle the exchange of a `refresh_token` for an `id_token` and then exchange of an `id_token` for expired temporary credentials? * Or does the SDK require developers to write application code that exchanges a `refresh_token` for an `id_token`? (Meaning the SDK would just handle exchanging an `id_token` for expired temporary credentials)
0
answers
0
votes
39
views
profile picture
asked 8 days ago
  • 1
  • 12 / page