In Depth Guide to Serverless APIs with AWS Lambda and AWS API Gateway (Part 2)
Blog post from Moesif
In the second part of a series on building a serverless API with AWS technology, the article explores third-party integration, data storage, and retrieval, as well as a method to simulate calling Lambda functions from within other Lambda functions without direct invocation. It demonstrates how to handle image uploads by requesting a pre-signed S3 URL via an API and uploading images directly to S3, which are then automatically tagged using a third-party image recognition service. The article explains setting up AWS SAM/CloudFormation resources, including a Lambda function to generate the pre-signed URL and an S3 bucket for storing images. It also covers using event-driven architecture to trigger Lambda functions based on S3 events, leveraging AWS Systems Manager's Parameter Store for securely storing API credentials, and implementing API endpoints for creating, listing, and deleting images using AWS Lambda and API Gateway. The guide emphasizes the benefits of using managed services in serverless architecture to avoid building custom solutions for common functionalities like authentication and storage.