简体   繁体   English

python 脚本使用 SAS 令牌将文件从 Amazon AWS s3 传输到 Azure Blob

[英]python script to Transfer file from Amazon AWS s3 to Azure Blob using SAS Token

I am trying to upload a file from Amazon S3 bucket to Azure Blob Storage using SAS token, I need to write a python code for that, I am trying to check in google and always finding the generating sas token related code, but my client is providing the SAS token, I don't need to create any SAS token, just use the existing one.我正在尝试使用 SAS 令牌将文件从 Amazon S3 存储桶上传到 Azure Blob 存储,我需要为此编写一个 python 代码,我正在尝试检查谷歌并始终找到生成 sas 令牌相关代码,但我的客户是提供 SAS 令牌,我不需要创建任何 SAS 令牌,只需使用现有令牌即可。

could somebody help me who knows python.谁能帮我知道 python。

Thanks in advance...提前致谢...

One of the workaround if you already have a SAS token is to use azcopy from Powershell. Below is the command that you can use如果您已经拥有 SAS 令牌,解决方法之一是使用azcopy中的 azcopy。以下是您可以使用的命令

azcopy cp "https://s3.amazonaws.com/mybucket/" "https://mystorageaccount.blob.core.windows.net/mycontainer<SAS>" --recursive

Also try refering Migrating from Amazon S3 to Azure Storage (Django web app)还可以尝试参考从 Amazon S3 迁移到 Azure 存储(Django web 应用程序)

REFERENCES: Move your data from AWS S3 to Azure Storage using AzCopy参考: 使用 AzCopy 将数据从 AWS S3 移动到 Azure 存储

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM