-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put object tagging does not work with aws cli #1978
Comments
Hi, We have two integration tests for setting and retrieving tags on objects using the V1 and V2 AWS SDKs for Java: How are you accessing the API? Cheers, |
Hi, Thanks for getting back in touch! I've tried with the aws cli and also aiobotocore, e.g. touch example.txt
aws s3api create-bucket \
--bucket x \
--endpoint http://localhost:9090
aws s3api put-object \
--body example.txt \
--bucket x \
--key y.txt \
--endpoint http://localhost:9090
# This works
aws s3api get-object-tagging \
--bucket x \
--key y.txt \
--endpoint http://localhost:9090
# This doesn't
aws s3api put-object-tagging \
--tagging '{"TagSet": [{"Key": "a", "Value": "b"}]' \
--bucket x \
--key y.txt \
--endpoint http://localhost:9090
|
not sure how aiobotocore produces the payload, but your AWS CLI payload is not valid JSON: you're missing the closing curly bracket. The payload should be: |
Sorry about the typo above, with the correct payload the server returns a 400 error |
ok, I could reproduce this locally. The API strictly lists XML as the only valid input for this API (AFAIK, this is the case for all S3 APIs): The AWS CLI does not set The Java SDKs always set the correct header, that's why the tests are passing. |
Thanks for the explanation! Is there any way the server side content-type checks can be relaxed? |
sure, that should be possible. |
@iw108 I released |
Hi,
Great work with the project, it's very useful!
I am currently trying to set some tags (
PutObjectTagging
) on an object, however the server always returns a 400 response. Do you have any ideas what's causing this? I am able to retrieve tags without a problem.Thanks in advance!
The text was updated successfully, but these errors were encountered: