I have a lambda function that makes a GetObject request to an s3 bucket. However im getting the following error:
AccessDenied: Access Denied\n at deserializeAws_restXmlGetObjectCommandError (/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js:6284:41)
I thought i had given access to the lambda function to make this request.
provider.iamRoleStatements: [
{
Effect: "Allow",
Action: ["s3:GetObject"],
Resource: "arn:aws:s3:::<redacted>",
},
],