I created a lambda function which gets invoked on file upload to an S3 bucket. The function then scans the file and outputs the result in Cloudwatch. When I deploy the exact same infrastructure using Cloudformation template, I get an error :
[ERROR] ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
The only difference between my trial and Cloudformation is that I am generating the bucket name dynamically in the template. Other than that, everything is the same. I am attaching the exact same permissions to the lambda function through CFN which would otherwise work in my testing.
I tried some of the other solutions mentioned where people fixed their system clock issue to get this working. I am doing everything through the UI and not using CLI.
My cloudformation template is uploaded here:
Can anyone help me solve this mystery. I am having a real tough time digging into this.