In this chapter, we have discussed security and why it is important. Applying the OWASP security by design principles is a good first step to ensure that your serverless stack is secure. We then discussed IAM roles and gave an overview of policies, explaining how they are the key documents to ensure restricted access to AWS resources. We then looked at an overview of some of the security concepts and principles regarding securing your serverless microservices, specifically regarding Lambda, API Gateway, and DynamoDB.
We then built a scalable serverless microservice with a RESTful data API. We started by creating a DynamoDB table, then added data to it, and queried it, first using the AWS console manually, then using the Python Boto3 SDK. We then built a simple Lambda to parse the request URL parameters, query DynamoDB, and return the records as part of a response body....