AWS CLI v.s AWS Console for developement - amazon-web-services

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.

Related

AppSync and thoughts on being locked in AWS

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.

How to go from a web2py api on EC2 to an AWS lambda serverless apps?

A web2py API approach is a complet project which need a server and provide endpoint to manage the business logic. Basicaly You will run such a webapp on an AWS EC2 and it fully makes sense that the scalability will be handle both via horizontal and vertical scaling.
Whereas, the AWS lambda in the other hand is a fully RESTFul approach to build an api app by triggering every needed python simplest actions. Which provide the serverless gain (meaning You actually use resources only if needed).
It is quite simple, for some project, to see that the serverless approach is more flexible and financially more interesting than the EC2 approach for scaling.
So my question is : if you already have a web2py api webapp déployed on an EC2 instance, how to you go to deploy it in an aws lambda in other to gain the serverless aspect that aws lambda bring? Do You need to fundamentaly reshape the code architecture of the web2py apps to properly gain the AWS lambda fashion ?

What is the recommended way of creating Serverless (or) AWS lambda functions on the fly

I'm creating a SaaS product which allows users to create their own apps. For each application I need to deploy a serverless app or just a lambda function with cloud watch events & api gateway configurations through cloud formation stack when a particular request hits my backend API (which is also a serverless application). I need to know the best practice or the recommended way of achieving that task.
There are two approaches I found by doing a bit of research.
1. Using aws sdk and create a cloud formation stack. (without using the serverless framework)
2. Using serverless-platform-sdk which deploys an app on serverless-platform (beta) which I'm not completely sure about.

Is AWSmobile-cli discontinued?

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

AWS Amplify/CLI vs AWS mobile hub

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