To solve this issue there are two steps:
-
remove s3 reference from events
-
add CORS configruation as below:
resources: Resources: S3BucketMyBucket: Type: AWS::S3::Bucket Properties: BucketName: bucketname-${self:provider.stage} CorsConfiguration: CorsRules: - AllowedHeaders: - "*" AllowedMethods: - GET - POST - PUT AllowedOrigins: - "*"