aws / aws/aws-sam-cli

Execute functions with roles specified in template

Open
#1,941 5 comments 0 reactions 0 assignees View on GitHub
area/lambda-invoke maintainer/need-followup type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

I have a function that sends an email with ses, and I specified in the template, among others:
```
Resources:
EmailFunction:
Type: AWS::Serverless::Function
Properties:
Policies:
- CloudWatchFullAccess
- AmazonSESFullAccess
```
Remotely, this works, as an implicit role is created with the specified policies attached. But locally, it tries to execute as the user specified in ~/.aws/config, and fails, as I haven't attached SES policies to this user. It would feel more consistent to me if it used the same role locally and remotely, is this possible?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.