aws-beam / aws_signature

Apache License 2.0
11 stars 8 forks source link

Make presigned URL method configurable #11

Closed jonatanklosko closed 3 years ago

jonatanklosko commented 3 years ago

This modifies the arguments, so I think we can just release 0.2.0 with this breaking change.

jonatanklosko commented 3 years ago

For the record, I generated the test signature using Ruby:

require 'aws-sdk-s3'

credentials = Aws::Credentials.new("AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY")
client = Aws::S3::Client.new(region: "us-east-1", credentials: credentials)
presigner = Aws::S3::Presigner.new(client: client)

presigner.presigned_url(:put_object,
  bucket: "examplebucket",
  key: "test.txt",
  time: Time.utc(2013, 5, 24, 0, 0, 0),
  expires_in: 86400
)