Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda can't copy emails from S3 #133

Open
WRobertLong opened this issue Sep 23, 2021 · 1 comment
Open

Lambda can't copy emails from S3 #133

WRobertLong opened this issue Sep 23, 2021 · 1 comment

Comments

@WRobertLong
Copy link

I have tried to follow all the instructions, but I am stumped by this problem. In the cloudwatch logs, the following is present:

level: 'info', message: 'Fetching email at s3://XXXXXXX.email/h9s9llkqemr9i9s38n61i5lo8iiuavkdcf35cq01'

I have verified that this file is indeed present in the S3 bucket.

However, the next log is:

level: 'error', message: 'copyObject() returned error:', error: AccessDenied: Access Denied at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/s3.js

I have checked the role which runs the lambda in AIM management console and I have given it full S3 access for now (AmazonS3FullAccess)

So I can't work out why this access denied error is occuring.

Any help would be appreciated.

@mattparkins
Copy link

I had a similar issue and it turned out to be the emailKeyPrefix which in my case should have been set to an empty string, not a slash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants