sst / guide

Repo for guide.sst.dev
https://guide.sst.dev
MIT License
3.68k stars 443 forks source link

S3 bucket should have etag header exposed #485

Open liebrand opened 4 years ago

liebrand commented 4 years ago

Just found that any half decent sized file for upload will fail, because amplify storage falls over if the s3 bucket does not have the etag exposed.

Simple fix to the CORS setup... in yml:

Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      # Set the CORS policy
      CorsConfiguration:
        CorsRules:
          -
            AllowedOrigins:
              - '*'
            AllowedHeaders:
              - '*'
            AllowedMethods:
              - GET
              - PUT
              - POST
              - DELETE
              - HEAD
            MaxAge: 3000
            ExposedHeaders:
              - ETag
jayair commented 4 years ago

Oh that's interesting. What file size did you try? I'd like to test it to verify the fix.