aws-sdk for Lambda not up to date? - amazon-web-services

I use a node4.3 Lambda Function triggered by a custom resource in my CloudFormation json that requires the latest aws-sdk to be able to call
var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
But it looks like the aws-sdk is not the latest since it errors and I can see in the logs that AWS.CognitoIdentityServiceProvider is undefined.
Am I doing something wrong or is there a workaround?

As per the docs here: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html
CognitoIdentityServiceProvider is not supported yet
Note: Although all services are supported in the browser version of
the SDK, not all of the services are available in the default hosted
build (using the script tag provided above). A list of services in the
hosted build are provided in the "Working With Services" section of
the browser SDK guide, including instructions on how to build a custom
version of the SDK with extra services.

Related

how to read the aws documentation

I am trying to set credentials for dynamodb following the instruction here: https://aws.amazon.com/getting-started/hands-on/real-time-leaderboard-amazon-aurora-serverless-elasticache/?trk=gs_card.
Now, I want to set a credential inside const client = new DynamoDBClient({ credential here }) by following https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dynamodb/interfaces/awsauthinputconfig.html#signer. I wasn't sure of the format of the credential inside the new DynamoDBClient method so I tried looking for the credentials code. The documentation says credential is defined in packages/middleware-signing/dist/types/configurations.d.ts:6, but I cannot find that at all.
How would I set the configuration and also know what they mean that credentials is defined in 'packages/middleware-signing/dist/types/configurations.d.ts:6'?
All AWS SDKs have their own Developer Guides. The AWS SDK for JavaScript is no different. To learn how to work with the AWS SDK for JavaScript, refer to the Developer Guide:
AWS SDK for JavaScript v3 Developer Guide
This guide contains all the information you need to get up and running with this SDK, including how to work with credentials.
TO learn how to work with the JavaScript SDK and DynamoDB, see:
Build an app to submit data to DynamoDB

Can I publish an agent version and manage environments on Dialogflow V2 API?

Can I publish an agent version on an environment using the Dialogflow V2 API?
I can't find any documentation on how to do that.
The doc about versions and environments only mentions doing this using the console (https://cloud.google.com/dialogflow/docs/agents-versions).
And the API doc of the agent environments resource only contains a list method (https://cloud.google.com/dialogflow/docs/reference/rest/v2/projects.agent.environments).
Does it mean that every change done using the API is automatically reflected in production?
Or does it mean that every change done by API is staged, and can only go to production by manually accessing the console and publishing the new version?
Both options seems terrible by the way.
Currently, it's not possible to manage agent versions through the Dialogflow API, it seems that this feature is already being contemplated to be integrated to Dialogflow; however, there is no an ETA for its implementation. You can follow up this request here.

How to integrate AWS Lex chatbot in Xamarin application?

I have basic understanding of .net and chatbot.
I wanted to integrate Amazon lex in xamarin(ios, android)app. There seems to be no example or sample. I have created chatbot from AWS platform intent and slots.
Also I wanted to use database to get query return. Any sample to integrate AWS Lex with Xamarin app would be helpful.
As I understand from your question, you already have some implementation of chatbot made with AWS services, but you are having issue on integrating it to your xamarin application to be able to use it in IOS and Android devices.
For that purpose, there is AWS Mobile SDK which happens to support also xamarin.
From their link:
https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/Welcome.html
I also did not find a Lex tutorial directly, but a very promising quote:
Supported AWS services currently include, but are not limited to [narrow list of services]
was on the same page. I looked around, found this text:
The AWS Mobile SDK for .NET and Xamarin also allows you to use most of the AWS services supported by the AWS SDK for .NET. The AWS services specific to mobile development are explained in this developer guide. For more information about the AWS SDK for .NET, see [a link]
clicked the link and ended here:
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/Index.html
and under link AmazonLex -> AmazonLexClient there was something, you probably wanted to see:
Version Information
.NET Standard:
Supported in: 1.3
.NET Framework:
Supported in: 4.5, 4.0, 3.5
Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms
Those 3 last let me understand that whenever you setup Mobile SDK, you get access to AWS services in Xamarin, also Lex.
Steps to install on
https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/setup.html
mainly contain steps on how to create xamarin app and get AWS account, most important is to install the AWS Mobile SDK for .NET and Xamarin and configure it. More detailed steps are under that link.
After that the process is to follow the instructions on:
https://aws.amazon.com/getting-started/projects/bots-just-got-better-net-toolkit-lex-lambda-cognito/module-one/
like pointed in comments. I suppose once you have access to any service via Mobile SDK, the wire up of Lex may go in similar steps and no special just xamarin tutorial is not needed anymore.
It seems you are looking for both architecture and sample code for implementing AWS Lex bot with .NET backend that can be integrated with iOS/Android Frontend.
You have multiple choices here to do it
Build both chat user interfaces in iOS and Android and integrate them AWS iOS & Android SDKs to utilize the AWS LEX bot.
Just implement a bot user interface in iOS and Android app and integrate it with a .NET backend that can utilize AWS .NET SDK to integrate with your LEX bot.
I would recommend the second approach as it will save you writing the LEX integration code twice both in Android and in iOS. In the second appraoch you will be able to write a single integration for AWS LEX in .NET and that can give a unified experience across the mobile devices(iOS/Android)
Now for the .NET based backend integration with AWS LEX bot.
If you are an experienced .NET developer and you know how will you host your code then only thing that you need is the .NET API reference for AWS LEX, which can be found here
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/Lex/TLexClient.html
But if you are not sure how to write this integration code and also not sure how the deployment will look like then you can follow the below tutorial
Bots Just Got Better with .NET and the AWS Toolkit for Visual Studio
Also, find here the architecture form the above tutorial
there is no direct solution like Amazon Lex is supported by React-native. i confirmed with xamarin team as well as AWS service one of the member. direct integration not possible.

How to import/integrate amazon aws-sdk to ionic2?

Ionic2 is Typescript based, and Amazon is providing javascript only version of its library.
Is it possible to integrate the Amazon aws-sdk into an Ionic2 app?
I have tried multiple methods including creating a typings file (and tsd), and trying to work out aws-cognito-angular2-quickstart but no luck so far...
Is creating an external javascript library and integrating it into the typescript code my only option?
Has anyone succeeded using Amazon Cognito from Ionic2 app?
You need to add typescript definitions of the AWS-SDK in your ionic2 and/or angular2 app. This will allow you to use all build-in functionalities provided in the AWS-SDK including Cognito.
Look at here to get started.

React Native AWS image upload

I am making an app in React native and will be using Amazon Web Services for image upload, I was wondering if the AWS node SDK can be used in my React Native app because I have read multiple outdated blogposts that said they were having issues, any one tried it out? (Node version: 4)
Thanks
The AWS Node SDK relies on several Node libraries like http that don't exist in React Native and are likely hard to reimplement faithfully. What I'd do is either use the native AWS SDKs and bridge them to JS, or write a small JS client just for S3 and look at the AWS Node SDK to see how they do authentication.
there is existing node packages like react-native-aws-signature that can help you do the authentication for AWS request for React-Native.
There is also a new library that has just been released to the official AWS repository which has full React Native support including a Storage module for interacting with S3 using signed requests: https://github.com/aws/aws-amplify