single-spa / import-map-deployer

A manifest deployment service for sofe/import maps
Apache License 2.0
191 stars 63 forks source link

AWS, s3, AccessControlListNotSupported #128

Closed raimonds-malisevs closed 2 years ago

raimonds-malisevs commented 2 years ago

Hello. When I try to use AWS S3 bucket as storage for import-maps with "ACLs disabled" option enabled for the bucket I get this error: "Could not patch service -- AccessControlListNotSupported: The bucket does not allow ACLs".

From documentation: "If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a 400 error with the error code AccessControlListNotSupported." https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#putObject-property

Am I missing something? Thank you in advance.

raimonds-malisevs commented 2 years ago

Found the solution. To make it work, I need to add this to my config.js: "s3":{
"putObject": {
"ACL": "bucket-owner-full-control" }
}