You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
When calling DeleteObjectTagging on an object in a versioned bucket without specifying the version id, the object's tags are not removed. However, this behavior works on a real AWS bucket with versioning enabled.
Expected Behavior
When calling aws s3api delete-object-tagging --bucket ${BUCKET} --key README.md against a bucket with versioning enabled, I expect a subsequent GetObjectTagging to return an empty TagSet.
How are you starting LocalStack?
With a docker run command
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)
docker run --rm -d -p "4566:4566" -e SERVICES=s3 localstack/localstack:stable
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
export AWS_ENDPOINT_URL=http://localhost:4566
export BUCKET=test
# create bucket
aws s3api create-bucket --bucket ${BUCKET}
# Without versioning
aws s3 cp ./README.md s3://${BUCKET}/README.md
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
aws s3api put-object-tagging --bucket ${BUCKET} --key README.md --tagging '{"TagSet": [{ "Key": "designation", "Value": "confidential" }]}'
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
# DeleteObjectTagging works without specifying a version id
aws s3api delete-object-tagging --bucket ${BUCKET} --key README.md
# Returns empty TagSet
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
# With versioning
aws s3api put-bucket-versioning --bucket ${BUCKET} --versioning-configuration Status=Enabled
aws s3 cp ./README.md s3://${BUCKET}/README.md
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
aws s3api put-object-tagging --bucket ${BUCKET} --key README.md --tagging '{"TagSet": [{ "Key": "designation", "Value": "confidential" }]}'
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
# DeleteObjectTagging doesn't work when not specifying a version id
# This works against an actual AWS bucket with versioning enabled
aws s3api delete-object-tagging --bucket ${BUCKET} --key README.md
# Returns the TagSet with designation=confidential
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
# DeleteObjectTagging **does** work when not specifying a version id
versionId="$(aws s3api delete-object-tagging --bucket ${BUCKET} --key README.md | jq -r .VersionId)"
aws s3api delete-object-tagging --bucket ${BUCKET} --key README.md --version-id ${versionId}
aws s3api get-object-tagging --bucket ${BUCKET} --key README.md
Unlike in put_object_tagging, which performs a get_object and then uses that response's version_id in get_unique_key_id, delete_object_tagging uses the caller's version_id in get_unique_key_id.
Is there an existing issue for this?
Current Behavior
When calling
DeleteObjectTaggingon an object in a versioned bucket without specifying the version id, the object's tags are not removed. However, this behavior works on a real AWS bucket with versioning enabled.Expected Behavior
When calling
aws s3api delete-object-tagging --bucket ${BUCKET} --key README.mdagainst a bucket with versioning enabled, I expect a subsequentGetObjectTaggingto return an emptyTagSet.How are you starting LocalStack?
With a
docker runcommandSteps To Reproduce
How are you starting localstack (e.g.,
bin/localstackcommand, arguments, ordocker-compose.yml)Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
Environment
Anything else?
Unlike in
put_object_tagging, which performs aget_objectand then uses that response'sversion_idinget_unique_key_id,delete_object_tagginguses the caller'sversion_idinget_unique_key_id.