Serverless Programming Cookbook
上QQ阅读APP看书,第一时间看更新

Creating a role and attaching a policy

You need to create a role with a trust policy that allows our Lambda to assume the role. You also need to attach a policy that has CloudWatch permissions for logging.