I'm currently looking for a example of implementing API gateway for GCP using the serverless framework, similar to how one would use it with AWS, has anyone successfully implemented a solution like this using the framework? I've looked a decent amount for an example but the serverless docs don't seem to have an example, so I wonder if it is even possible as of right now with the serverless framework.
Related
I am using AWS Toolkit to create a Serverless Application using SAM. It contains API Gateway over AWS Lambda. I want the Lambda function to be able to access data in Postgres database. In pass I have done this using Django REST Framework. But I don't want the overhead of using the entire DRF as API Gateway is taking care of the need of the REST layer.
Our team is pretty well versed with Django ORM and we want to leverage on that knowledge base.
Trying to combine AWS Serverless plus Django leads all the google searches to Zappa, but that's not an option for us (let's leave it to that :) ). We want to use the AWS Toolkit + SAM way.
Any help would be greatly appreciated.
I have an application using Nest.js, and I'd like to deploy it using API Gateway + Lambda functions.
I have some experience with AWS, but it's my first time with a serverless application.
I searched for some things but almost everything that I found uses the Serverless framework, and I would like to do it using the AWS SDK.
I have an API with 4 endpoints, I want to use API Gateway and a single Lambda function to run the application.
Any tips on how I could do that?
Thanks in advance.
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 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.
I'm building an app and the idea is to go serverless.
I'm looking mainly at AWS and GCP (Google Cloud Platform), and as AWS costs are a bit obscure (at least for me), and there is no way to ensure not being billed, I'm going with GCP.
For the "server" part of the app, I would like to build an API on GCP as I could do with AWS API Gateway, but I couldn't find any matching product for that.
The closer one was Google Cloud Endpoint, but it seems to have a very different concept from AWS API Gateway. I've watched some videos about it (for example https://www.youtube.com/watch?v=bR9hEyZ9774), but still can't get the idea behind it or if it fits my needs.
Could someone please help clarify which GCP product would be suitable for creating an API and how it compares to AWS API Gateway?
Some link with info/example on how to do it would be really appreciated.
Google Product Manager here.
We don't have an exact analog for AWS API Gateway.
You're right about Cloud Endpoints. It's a bit of a different architecture than AWS uses -- it's a sidecar proxy that gets deployed with the backend. That's different than API Gateway, which is a fully managed proxy deployed in front of your backends.
If you are deploying in App Engine Flexible environments: good news! The Endpoints Proxy can be deployed as part of your deployment. It can do things similar to AWS API Gateway (API key validation, JWT validation, rate limiting).
We are working on some plans to allow for the proxy to be used in other places (Cloud Functions and the newer App Engine Standard runtimes).
And, finally: on our older App Engine Java and Python runtimes, we have API Frameworks that provide the same functionality. Those frameworks do the same thing as the proxy, but get expressed as code annotations and built into your app. We're moving away from the framework model in favor of the proxy model.
An example of springboot project with google cloud app engine can be found here-https://github.com/ashishkeshu/googlecloud-springboot