0

For my current Python project I' using the Microsoft Azure SDK for Python. I want to copy a specific blob from one container path to another and tested already some options, described here.

Overall they are basically "working", but unfortunately the new_blob.start_copy_from_url(source_blob_url) command always leads to an erorr: ErrorCode:CannotVerifyCopySource. Is someone getting the same error message here, or has an idea, how to solve it?

I was also trying to modify the source_blob_url as a sas-token, but still doesn't work. I have the feeling that there is some connection to the access levels of the storage account, but so far I wasn't able to figure it out. Hopefully someone here can help me.

3

1 Answer 1

0

Is someone getting the same error message here, or has an idea, how to solve it?

As you have mentioned you might be receiving this error due to permissions while including the SAS Token.

The difference to my code was, that I used the blob storage sas_token from the Azure website, instead of generating it directly for the blob client with the azure function.

  • In order to allow access to certain areas of your storage account, a SAS is generated by default with a number of permissions such as read/write, services, resource type, Start and expiration date/time, and Allowed IP addresses, etc.
  • It's not that you always need to generate directly for the blob client with the azure function but you can generate one from the portal too by allowing the permissions.

enter image description here

REFERENCES: Grant limited access to Azure Storage resources using SAS - MSFT Document

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.