Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate_presigned_url for put_object return The request signature we calculated does not match the signature you provided #1722

Closed
redbass opened this issue Oct 3, 2018 · 3 comments
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made.

Comments

@redbass
Copy link

redbass commented Oct 3, 2018

I'm trying to create a presigned url that will help some customers to upload files .
Here my test script that is currently working

# Get the service client.
s3 = boto3.client('s3')
boto3.set_stream_logger(name='botocore')

# Generate the URL to get 'key-name' from 'bucket-name'
url = s3.generate_presigned_url(
    ClientMethod='put_object',
    Params={
        'Bucket': s3_bucket_name,
        'Key': test_key,
    }
)

files = StringIO("asdfasdfasdf")
response = requests.put(url, data=files)

print(str(response.content))

But if I'm adding:

`ACL': 'public-read' 

to Params (or add some metadata following the information in the put_object documentation I receive back from the server:

The request signature we calculated does not match the signature you provided. Check your key and signing method.
@daredevil82
Copy link

Duplicate of issue #934

@joguSD
Copy link
Contributor

joguSD commented Oct 5, 2018

@redbass Does the linked issue above help or are you still have troubles?

@joguSD joguSD added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 5, 2018
@no-response
Copy link

no-response bot commented Oct 12, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made.
Projects
None yet
Development

No branches or pull requests

3 participants