How stable are the listed services for AWS SDK for React Native?
I have a front-end developed in React Native and want to utilize AWS cloud services. My concern is that the SDK is just a preview with claims to support S3, Lambda, and SNS. I'd like to know if anyone has had success using these services in their React Native apps and if there are any gotchas I should be aware of.
Thanks!
Announcing the AWS SDK for React Native: https://aws.amazon.com/blogs/mobile/announcing-the-aws-sdk-for-react-native/
Take a look at the new AWS Amplify library released to the official AWS repo which has React Native support: https://github.com/aws/aws-amplify
You can install via npm:
npm install aws-amplify-react-native
Then import into your project:
import Amplify from 'aws-amplify-react-native'
There are modules for wrapping your React Native Components with HOCs for tasks such as Authentication, Analytics, APIs, Storage, etc.
Related
I am new to AWS. what service in AWS is equivalent to FIrebase realtime database for Android app development. As Firebase has SDK for Android is there any SDK for android in AWS also which can be used for the same?
AWS Amplify is very good option as an alternative to Firebase in AWS services. I have created a video on Firebase alternatives on YouTube. You can watch it at Firebase Alternatives
When attempting to initilaise awsmobile cli, it says development is being discontinued, switch to AWS Amplify cli.
AWS mobile was fantastic, in that it setup all the backend components i needed automatically. No need to use a templated project.
How on earth does AWS Apmlify help you do this easily for React Native projects??I need S3, Cognito, DynamoDB (which is less than half the price of AppSync)
Yup - looks like it's being discontinued.
On their site they recommend using Amplify CLI instead
I'm new with AWS mobile hub and today I just notice there is a new AWS Amplify/CL, now I'm super confused with these two libs.
My understanding was AWS mobile cli is a tool that create aws backend service, and amplify js just client library that hook up with the aws backend.
But now I see this AWS Amplify/CLI, it also can create aws service and also creates the aws-exports.js file, and now AWS Amplify docs has changed, it no longer tell you how would it works with mobile hub, instead use Amplify/CLI to create services.
Dose it mean I should use AWS Amplify/CLI instead?
Use the Amplify CLI going forward, it's more flexible architecture that allows a comprehensive feature set. See the information in this post:
Existing Mobile Hub projects continue to work without requiring any app changes. If you’re using the AWS Mobile CLI for existing projects, you can also continue to use that older CLI. However, going forward, new features will be added to the AWS Amplify CLI toolchain which does not use Mobile Hub.
If you’re building a new mobile or web app, or adding cloud capabilities to brownfield apps, use the new AWS Amplify CLI. The new Amplify CLI will allow you to take advantage of all the new features outlined in this blog, as well as the rich CloudFormation functionality to unlock more workflows and future tooling.
Section: Existing tooling, https://aws.amazon.com/blogs/mobile/announcing-the-aws-amplify-cli-toolchain/
For current Mobile Hub users, we just released a Mobile Hub to Amplify CLI migrator that you can access here: https://github.com/awslabs/amplify-mobilehub-migrator. This will help you import your Mobile Hub resources into an Amplify project, give you an exports file, and allow you to leverage Amplify CLI features such as GraphQL APIs, Codegen, and the GraphQL Transform.
Update - AWS Mobile Hub will be replaced by AWS Amplify on October 30, 2021. Existing users should plan a migration strategy. For apps already deployed with Mobile Hub, resources created by Mobile Hub will continue to function.
"If you don't migrate your project to Amplify, your app will continue to function, and all your related cloud resources will continue to be available. However, you won't be able to access the Mobile Hub project container after October 15, 2021." - https://docs.aws.amazon.com/aws-mobile/latest/developerguide/what-is-aws-mobile.html#migrate-to-amplify
Does Amplify support the Offline capabilities outlined here:
https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-react.html#offline-settings
Should I set it up like this?
https://aws.github.io/aws-amplify/media/api_guide#configuration-for-graphql-server
Or for offline capabilities, do I have to use something like Apollo?
There is a difference between AWS Amplify and AWS App Sync.
AWS Amplify is a library for web and mobile developement in JavaScript providing better access to AWS services like Auth, Analytics, Storage, APIs, Caching.
AWS AppSync is a combination of service that works as a GraphQL server and SDK (for web, iOS and Android). This SDK extends Apollo Client to provide capabilities like Offline and Realtime synchronization out of the box.
So, to answer your question: AWS AppSync does provide offline via its SDK out of the box and you shouldn’t need to do anything specifically to set up that.
I like the friendly interface that AWS Mobile Hub provides to disparate Amazon services, but I'd like to use it to create a web application, rather than a native iOS or Android app.
It's not clear to me how to do so, since there's no option for javascript sample code or any mention of web applications:
Am I missing something? Is there documentation for this use-case elsewhere?
All of the resources that are configured by various features in Mobile Hub (e.g., NoSQL Database, Cloud Logic APIs) are usable directly from a web app in the browser. For example, you can turn on the App Content Delivery feature, enable web hosting on your Amazon S3 bucket, download/copy the AWS JavaScript SDK into your Amazon S3 bucket, and start writing your web app. The JavaScript SDK will allow you to interact with your Mobile Hub resources (found on the "Resources" page in the left Nav menu in Mobile Hub's console).
However, we do realize these steps are tedious and we have had similar feedback from other customers. So, we are actively working to make these steps easier.
In the meantime, you can get the AWS JavaScript SDK here:
https://aws.amazon.com/sdk-for-browser/
And, you may find some of our github samples are a good starting point, like this one:
https://github.com/awslabs/lambda-refarch-webapp
For those looking to build web apps, AWS has a JavaScript library called AWS Amplify that makes building cloud web apps easy: https://aws.github.io/aws-amplify/