I have my following shell script which I am using to upload files to my s3 bucket.
#!/bin/sh
export AWS_ACCESS_KEY_ID="$KEY_ID"
export AWS_SECRET_ACCESS_KEY="$KEY_SECRET"
echo "[INFO] AWS_ACCESS_KEY_ID - $AWS_ACCESS_KEY_ID"
echo "[INFO] AWS_SECRET_ACCESS_KEY - $AWS_SECRET_ACCESS_KEY"
S3_URL="s3://mybucket/uploads"
aws s3 cp ../data.pdf $S3_URL/data.pdf
aws s3 cp ../data.html.zip $S3_URL/data.html.zip
echo "[INFO] Uploaded Successfully"
echo ""
When I run this script, the files get uploaded to S3 bucket. However, I see some extra characters at the end of the key name.
Here is the screenshot from my S3 browser UI,
Can somebody tell me why these characters are coming up automatically, when I didnt intend them to come.
How can I get rid of these?
Also, this is creating issues for my download service which is not able to read these files and gets Key not found error.