Example for the SigV4A algorithm in Python for accessing S3 Multi Region Access points

1

Hi. I wanted to use S3 Multi Region Access Points. Saw the documentation here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRequests.html which tells that the mrap alias can be used using the REST APIs but a SigV4A algorithm must be used for signing. I tried to find examples for this but could only find examples for the SigV4 algorithm here: https://docs.aws.amazon.com/code-samples/latest/catalog/code-catalog-python-example_code-signv4.html

I was able to see that the logic internally is doing something with the AWS4-ECDSA-P256-SHA256 algorithm and passing the X-Amz-Region-Set': '* in the headers by adding some logging in the python botocore package locally.

Is there any public document available for the SigV4A (Asymmetric) signing logic using python?

Gaurav
已提問 2 年前檢視次數 1826 次
2 個答案
0

Hi,

I am assuming that if you're following the documentation to sign the requests you're using the AWS SDK, if so, then you don't need to worry about sigv4a as the SDK will automatically convert to this new version of the sigv4 format. You can find the information on the documentation here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRequests.html, specifically with this paragraph:

  • Requests must be signed using Signature Version 4A (SigV4A). When you use the AWS SDK, the SDK automatically converts a SigV4 signature to SigV4A. For more information about SigV4A, see Signing AWS API requests in the AWS General Reference.

Hope this helps.

Best,

profile pictureAWS
已回答 2 年前
0

You can find code samples for the implementation of SigV4A in this repo https://github.com/aws-samples/sigv4a-signing-examples

AWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南