Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/modules/components/pages/outputs/aws_s3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ output:
force_path_style_urls: false
max_in_flight: 64
timeout: 5s
object_canned_acl: private
object_canned_acl: ""
batching:
count: 0
byte_size: 0
Expand Down Expand Up @@ -387,7 +387,7 @@ The object canned ACL value.

*Type*: `string`

*Default*: `"private"`
*Default*: `""`

Options:
`private`
Expand Down
7 changes: 5 additions & 2 deletions internal/impl/aws/s3/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ output:
}
})...).
Description("The object canned ACL value.").
Default(string(types.ObjectCannedACLPrivate)).
Default("").
Advanced(),
service.NewBatchPolicyField(s3oFieldBatching),
).
Expand Down Expand Up @@ -473,7 +473,6 @@ func (a *amazonS3Writer) WriteBatch(wctx context.Context, msg service.MessageBat
WebsiteRedirectLocation: websiteRedirectLocation,
StorageClass: tmtypes.StorageClass(storageClass),
Metadata: metadata,
ACL: tmtypes.ObjectCannedACL(a.conf.ObjectCannedACL),
}

// Prepare tags, escaping keys and values to ensure they're valid query string parameters.
Expand All @@ -498,6 +497,10 @@ func (a *amazonS3Writer) WriteBatch(wctx context.Context, msg service.MessageBat
uploadInput.ChecksumAlgorithm = tmtypes.ChecksumAlgorithm(a.conf.ChecksumAlgorithm)
}

if a.conf.ObjectCannedACL != "" {
uploadInput.ACL = tmtypes.ObjectCannedACL(a.conf.ObjectCannedACL)
}

// NOTE: This overrides the ServerSideEncryption set above. We need this to preserve
// backwards compatibility, where it is allowed to only set kms_key_id in the config and
// the ServerSideEncryption value of "aws:kms" is implied.
Expand Down