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
Related
I am a beginner in aws serverless.
I am now building 2 frontends using same aws serverless backend, and I am in the middle of the development.
I am currently using aws lambda, cognito, API Gateway, Dynamodb, IAM, S3 console.
Every time when I need to do something in the backend, I will go to the console and do it directly.
Recently I've discovered there is aws amplify framework and CLI which seems quite convenient.
I have a few questions for it:
1.What is the general pros and cons of using only console and using CLI for development?
2.Do you, or do most of the developers have preference for using one of it?
3.If I continue using only console for development, are there any problems foreseeable in the future?
4.If I change to use CLI for development, is there any difficulty to integrate my current work?
I would recommend using an IaC Framework, for example AWS CloudFormation. This way you can version your changes.
Only instant changes should happen via the console.
I have created a Spring cloud microservices project with netflix APIs and a frontend with React. Now, I want to migrate this project to serverless using amazon web services with DynamoDB and cognito. Do you know, which steps should I follow to do that? And what should I consider before doing this migration? For the Frontend React I decided to use S3 to host it.
Be sure if u really want to do this . This will be a big project; almost like re-writing complete codebase. Good part is that lambda supports Java so u might end up doing lots of copy paste. You would have a lambda function of each REST api endpoint u were exposing.
I have been thinking about building a backend with graphQL.
The aim is to make the life of the backend team easier and iterate quicker rather then have to build REST endpoints or wss actions for each dataset retreivale.
GraphQL seems to be one of solution. We are very familliar with the Lambda environement and therefore in our research we found AppSync. I looks like a perfect solution, however I have some concerened around being locked in AWS and by designing the whole architecture around AppSync.
The beauty of serverless is that with the Serverless Framework, we could redeploy all functions to another cloud provider (Azure Functions) or even dockerize the functions for a deployment onprem.
I am concerned that with AppSync there is really no alternative in either other cloud providers or to easly do this onprem. Does anybody have any experience with this? Would it be more worth it to do the work to deploy an appolo server in lambda and build the connectors/listeners to the data sources our selfs with something like this: https://github.com/michalkvasnicak/aws-lambda-graphql/tree/aws-lambda-graphql%400.13.0#design-michalkvasnicak ?
IMHO, it comes down to how exactly the client of the GraphQL endpoint will secure data. One strategy is to secure an app with Amazon identity services like IAM and Cognito. Amplify's strength is secure integration with IAM, Cognito, API Gateway, DynamoDB, S3, and AppSync. A secure GraphQL endpoint on AppSync, for example. The data hosted in each AWS cloud service can be secured with Amplify and there are many other strategies too.
The serverless framework is a break through for serverless developer operations. The framework is beautiful. I don't disagree with your concern that Amplify generated cloudformation is not portable. Cloudformation is different DevSecOps culture than the Serverless framework. Amplify's generated DevSecOps code simply lands in Cloudformation culture.
I'm awfully new to GraphQL on the cloud, FWIW. I don't have experience with Apollo on Lambda. I cried, it looked difficult to automate the security though a seasoned pro may know. I certainly hope you get to a point where you never have to throw a single line of code away. I'm not even close, yet.
An easy entry point to the AWS eco system is to use AWS Amplify.
It has documentation guidance on security, GraphQL API, etc.
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.