Understanding security in SAM

So far, we have learned how to write, build, package, and deploy Lambda functions using the SAM. We will now understand how security works inside them:

  1. You can scroll to the bottom of the Lambda console to see the network and security settings, where the VPC and the subnet details are mentioned:
  1. Now, we will add in the network settings, which include the security groups and the subnet IDs:
AWSTemplateFormatVersion: '2010-09-09'Transform: 'AWS::Serverless-2016-10-31'Description: A starter AWS Lambda function.Resources:    helloworldpython3:        Type: 'AWS::Serverless::Function'        Properties: Handler: lambda_function.lambda_handler ...

Get Building Serverless Applications with Python 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.