serverless-thumbnails
serverless-thumbnails copied to clipboard
Needed PutObjectAcl permission to execute
Hi. I spent a while wondering why my project didn't work when it was similar to your and realised I needed this permission also. Perhaps you have a global permission set for this when testing? I can add a pull request to update example if you wish so other people don't experience this.
- Effect: Allow Action: - s3:PutObjectAcl Resource: '*'
You are correct!
Edit the serverless.yml file to include the additional permission to PutObjectAcl
`service: serverless-thumbnail
provider: name: aws iamRoleStatements:
- Effect: Allow
Action:
- s3:putObject
- s3:PutObjectAcl Resource: '*'
functions: thumbnail: handler: functions.thumbnail events: - http: get thumbnail
resources: Resources: NewResource: Type: AWS::S3::Bucket Properties: BucketName: ${env:THUMBNAILS_BUCKET} `