1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hi, the exact signature used by AWS service is SigV4.
It is described here: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
My advice is to use boto3 (python SDK for AWS services): it will sign the requests for you.
See https://aws.amazon.com/sdk-for-python/
If you really want to code SigV4 on you own, you can get inspired by boto3 source code at https://github.com/boto/botocore/blob/develop/botocore/auth.py
Hope it helps!
Didier
Contenuto pertinente
- AWS UFFICIALEAggiornata 4 anni fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 9 mesi fa
Hi Didier, Thanks for the response.
As suggested in https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#
In the directory where I am running python scripts, I created new folder ".aws" and created 2 files inside this folder. File 1 name is "credentials" and kept aws_access_key_id and aws_secret_access_key inside that file. Another file name is "config" and mention the reason in this file. Now I launched python3 interactive mode and did "import boto3" and "s3 = boto3.resource('s3')". Here I tried the example code to list the buckets available.
for bucket in s3.buckets.all(): print(bucket.name)
Here I am fasing exception... botocore.exceptions.NoCredentialsError: Unable to locate credentials
What I am missing, can you help