How to choose an AWS profile when using boto3 to connect to CloudFront

后端 未结 4 882
醉话见心
醉话见心 2020-11-30 19:19

I am using the Boto 3 python library, and want to connect to AWS CloudFront. I need to specify the correct AWS Profile (AWS Credentials), but looking at the official documen

4条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 19:55

    Just add profile to session configuration before client call. boto3.session.Session(profile_name='YOUR_PROFILE_NAME').client('cloudwatch')

提交回复
热议问题