DEV Community

loading...
Cover image for The guide to connect AWS Amplify to any (AWS) service 2.0
AWS Community Builders

The guide to connect AWS Amplify to any (AWS) service 2.0

rpostulart profile image rpostulart ・2 min read

I have written a few blogs about Amplify. One of my previous blogs was about how you can connect AWS Amplify to each AWS service with AWS Lambda and include the AWS SDK.

AWS SDK 2.0

When you did

yarn install aws-sdk
Enter fullscreen mode Exit fullscreen mode

the full aws-sdk package (57MB) was installed and then you were able to import services like:

const AWS = require("aws-sdk");
AWS.config.region = "eu-west-1";
const pinpoint = new AWS.Pinpoint();
Enter fullscreen mode Exit fullscreen mode

AWS SDK 3.0

With the release of @AWS-SDK 3.0 you are able to do modular package imports in React Native and Lambda now. For example if your want to access S3 (7 MB) in React Native without the Amplify framework. You can run:

yarn install @aws-sdk/client-s3
Enter fullscreen mode Exit fullscreen mode

Look into this tutorial for more code:
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/getting-started-react-native.html

More resources:

@AWS-SDK V3 API Docs

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html

Blog about performance improvement

https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/

Launch announcement

https://aws.amazon.com/blogs/developer/modular-aws-sdk-for-javascript-is-now-generally-available/

About me

I am a doing (side)projects with technology like AWS Amplify, ReactJS, React Native and EXPO. I am an AWS community builder. I am a huge fan of AWS Amplify and blog about certain topics that come along with it. If you have any questions related to the framework, React of React Native then you can always reach out to me.

Twitter

Alt Text

Do you want to be updated about new blogs?
Follow me on twitter: https://twitter.com/ramonpostulart

Discussion (0)

pic
Editor guide