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 ...
Example – CRUD service
Get Cloud Native Development Patterns and Best Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.