S3 batch job error Task target couldn't be URL decoded


I need to restore a lot of object from aws s3 glacier deep archive. So i try to use a s3 batch jobs. For that i use a python code to create a manifest as a csv with to columns Bucket,Key. But my first issue : some Key contain a comma so the job failed.

To solve (partialy) this issue i just cut the csv file to keep only the first two columns hoping that there are not many files involved.

But now i have another issue:

ErrorMessage: Task target couldn't be URL decoded

Any Idea ?

asked a year ago547 views
1 Answer

This error messaage can appear when you have objects that contain special characters. To account for these special characters, you must URL encode the manfiest file.

For more information about creating and using a custom manifest file, please refer to the following link: https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops-create-job.html#specify-batchjob-manifest

When using Python, you can use the "urllib.parse" library to easily URL-encode the manifest file. For more information about this library, please refer to the following link: https://docs.python.org/3/library/urllib.parse.html

profile pictureAWS
answered a year ago
  • Thank you. In fact I was already on the track of using urlIb3 but I didn't know that you could put directly the URL encode in the manifest. But we agree that you have to use "+" instead of spaces (so use urllib.parse.quote_plus() )

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions