Hence I figured I should call the functionality in here as such, passing a vector of dictionaries:
function s3_delete(aws::AbstractAWSConfig, bucket, paths::Vector; kwargs...)
delete = []
for path in paths
push!(delete, Dict("Object" => Dict("Key" => path)))
end
return parse(S3.delete_objects(bucket, delete; aws_config=aws, kwargs...))
end
That however throws a signature error:
ERROR: AWS.AWSExceptions.AWSException: SignatureDoesNotMatch -- The request signature we calculated does not match the signature you provided. Check your key and signing method.
Looking at https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html#API_DeleteObjects_RequestSyntax, this API needs to be invoked with a Delete>NxObject>Key hierarchy, which AWS.jl already provides the toplevel Delete entry: https://github.com/JuliaCloud/AWS.jl/blob/5ebf8caa636dc8f2d051aea70a69adc7d146cad4/src/services/s3.jl#L1570
Hence I figured I should call the functionality in here as such, passing a vector of dictionaries:
That however throws a signature error:
The
delete
object I pass is as follows:Calling
S3.delete_object
with this key works fine.