amazon-connect / amazon-connect-salesforce-lambda

Apache License 2.0
45 stars 34 forks source link

ClientError: AccessDenied File "/var/task/sfIntervalQueue.py", line 50 #37

Closed nelsonic closed 2 years ago

nelsonic commented 2 years ago

Greetings Amazon Connect Gurus! 👋

We have deployed the AmazonConnectSalesforceLambda via the Deploy button.

serverlessrepo-AmazonConnectSalesf-sfIntervalQueue

It appears to have successfully deployed but we cannot verify as there's no check we can run. 🤷‍♂️ We have configured all the reports in Amazon Connect as per the instructions. But when the serverlessrepo-AmazonConnectSalesf-sfIntervalQueue lambda function is executed

Seeing the following Error in our CloudWatch logs:

[ERROR] ClientError: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied Traceback (most recent call last):   File "/var/task/sfIntervalQueue.py", line 50, in lambda_handler

cloudwatch-access-error

Hoping this is something easy to fix and we missed something obvious in our setup ... 🤞 (thanks in advance for your help!)

ramaniad commented 2 years ago

My guess is that you might have specific bucket permissions in the s3 bucket that is blocking the lambda execution role from accessing the data in it, and/or a KMS key encrypting the bucket that you need to allow the lambda execution role to be able to access

nelsonic commented 2 years ago

@ramaniad thanks for reply. I added the permissions to the execution role and now it can read the files. ✅