如何从 Python 将 --no-verify-ssl 传递到 AWS CLI?

发布于 2025-01-18 08:44:27 字数 439 浏览 1 评论 0原文

我是新来的,可以让AWS CLI工作,最后让我的命令通过Gitbash进行工作:

aws s3 ls --no-verify-ssl

我现在正在尝试从Python运行相同的命令。 我需要能够在AWS S3中执行以下任务,从Python:

  • 将数百个本地文件夹复制到S3存储桶中。
  • 更新S3存储桶上的现有文件夹,并在本地版本上进行更改。
  • 列出S3存储桶的内容。

在这里阅读类似的帖子时,我看到-No-Verify-SSL意味着存在更大的问题,但是使用它是我们的网络人们设置事物的方式,而我对此无法控制。这是他们需要使用的标志来允许访问AWS CLI。

我尝试使用boto3并在那里运行python命令,但是我遇到了一个身份验证错误,因为我不知道如何从python传递-no-verify-ssl标志。

I am new to get AWS CLI working, and finally have my commands working through gitBash with:

aws s3 ls --no-verify-ssl

I am now trying to run the same commands from Python.
I need to be able to do the following tasks in AWS s3 from Python:

  • Copy hundreds of local folders to the s3 bucket.
  • Update existing folders on the s3 bucket with changes made on local versions.
  • List contents of the s3 bucket.

In reading similar posts here, I see that --no-verify-ssl means there is a bigger problem, however using it is the way our network people have set things up, and I have no control over that. This is the flag they require to be used to allow access to the AWS CLI.

I have tried using boto3 and running the Python command there, but I get an authentication error because I don't know how to pass the --no-verify-ssl flag from Python.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文