2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
HI, ShamrockAws . Please follow this documentation https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html These must be helpful for your case.
Best regards, Andrii
Thanks Andrii, I tried thisimport boto3
client = boto3.client( 's3', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY, aws_session_token=SESSION_TOKEN )
but I get NameError name ACCESS_KEY is not defined
0
ACCESS_KEY, SECRET_KEY, and SESSION_TOKEN are variables that contain your access key, secret key, and optional session token. Note that the examples above do not have hard coded credentials. We do not recommend hard coding credentials in your source code.
So please configure this variable to resolve an issue with "NameErro".
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a 6 mois
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
it works if I hard code my credentials in my script