serverless-thumbnails icon indicating copy to clipboard operation
serverless-thumbnails copied to clipboard

Needed PutObjectAcl permission to execute

Open brianfoody opened this issue 8 years ago • 1 comments

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: '*'

brianfoody avatar Oct 14 '16 03:10 brianfoody

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} `

dzeitman avatar Dec 03 '16 14:12 dzeitman