Execution role

  1. Now that we have learned how to write our first Go Lambda function, let's create a new IAM role from Identity and Access Management (https://console.aws.amazon.com/iam/home) to grant the function access to AWS CloudWatch Logs:
  1. In the permissions page, you can either choose an existing AWS managed policy called CloudWatchFullAccess or (as shown in Step 3) create a least-privilege IAM role (the second option is recommended by AWS; a chapter dedicated to this will discuss security best practices for Lambda functions in depth):
  1. Go ahead and click on the Create policy button, and create a policy by selecting the appropriate ...

Get Hands-On Serverless Applications with Go now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.