O'Reilly logo

Cloud Native Development Patterns and Best Practices by John Gilbert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example – CRUD service

This example demonstrates creating a simple and secure RESTful CRUD service, using the AWS API Gateway along with AWS Cognito, AWS Lambda, and AWS DynamoDB. The following Serverless Framework serverless.yml file fragment defines an API Gateway with a RESTful resource to PUT, GET, and DELETE items. Each of these HTTP methods is mapped to a Lambda function: save, get, and delete, respectively. We also enable Cross-Origin Resource Sharing (CORS) support so that the resource can be accessed from a web application, usually written in React or Angular. To add OAuth 2.0 support, we provide the Amazon Resource Name (ARN) for the AWS Cognito User Pool that is used to authenticate the users. Throttling is provided by default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required