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

Add support for aws_chunked with s3v4. #996

Open
wants to merge 1 commit into
base: develop
from

Conversation

Projects
None yet
4 participants
@timuralp
Copy link
Contributor

timuralp commented Aug 3, 2016

When uploading to S3 from a stream, it would be useful to opt into S3
aws_chunked uploads with v4 signatures. The mechanism is documented
here:
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html

The feature is implemented through a new auth class --
S3SigV4ChunkedAuth. The class wraps the body of the request with a
ChunkedUploadWrapper instance. It takes care of producing fixed size
upload chunks and computing the required signatures for each one.

To opt into this scheme, the caller is required to set the aws_chunked
option for client configuration and it will only be used with the
PutObject operations.

Fixes #995

@timuralp

This comment has been minimized.

Copy link
Contributor

timuralp commented Aug 3, 2016

I wasn't sure if this is the right approach to this problem and the PR doesn't have any unit tests at the moment. If there is agreement that this make sense or guidance on how to rework it, I'm happy to work further on the PR and add the tests.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Aug 3, 2016

Codecov Report

Merging #996 into develop will decrease coverage by 1.35%.
The diff coverage is 89.14%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #996      +/-   ##
===========================================
- Coverage    98.03%   96.68%   -1.36%     
===========================================
  Files           45       44       -1     
  Lines         7345     7264      -81     
===========================================
- Hits          7201     7023     -178     
- Misses         144      241      +97
Impacted Files Coverage Δ
botocore/signers.py 97.25% <80%> (-1.19%) ⬇️
botocore/auth.py 96.29% <89.51%> (-2.01%) ⬇️
botocore/configloader.py 75.94% <0%> (-24.06%) ⬇️
botocore/compat.py 68.14% <0%> (-23.71%) ⬇️
botocore/translate.py 92.68% <0%> (-7.32%) ⬇️
botocore/handlers.py 94.13% <0%> (-2.19%) ⬇️
botocore/docs/sharedexample.py 97.16% <0%> (-1.42%) ⬇️
botocore/docs/bcdoc/style.py 94.05% <0%> (-1.17%) ⬇️
botocore/paginate.py 96.59% <0%> (-0.61%) ⬇️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81f8c4c...d27e1e6. Read the comment docs.

@timuralp timuralp force-pushed the timuralp:feature/aws-chunked branch Aug 3, 2016

@jamesls

This comment has been minimized.

Copy link
Member

jamesls commented Aug 3, 2016

Linking issues, boto3 tracking issue: boto/boto3#751

Pending discussion over on the issue.

@timuralp timuralp force-pushed the timuralp:feature/aws-chunked branch to b1e1297 Aug 11, 2016

Add support for aws_chunked with s3v4.
When uploading to S3 from a stream, it would be useful to opt into S3
aws_chunked uploads with v4 signatures. The mechanism is documented
here:
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html

The feature is implemented through a new auth class --
S3SigV4ChunkedAuth. The class wraps the body of the request with a
ChunkedUploadWrapper instance. It takes care of producing fixed size
upload chunks and computing the required signatures for each one.

To opt into this scheme, the caller is required to set the aws_chunked
option for client configuration and it will only be used with the
PutObject operations.

Fixes #995

@timuralp timuralp force-pushed the timuralp:feature/aws-chunked branch from b1e1297 to d27e1e6 Jul 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment