Skip to content

TagResource with empty Tags and UntagResource with empty TagKeys get HTTP 200, where DynamoDB requires at least one tag or tag key #1237

Open

Description

@LeeroyHannigan

ExtendDB accepts both requests and answers HTTP 200 with an empty body:

  • TagResource with "Tags": [] on an existing table
  • UntagResource with "TagKeys": [] on the same table

Amazon DynamoDB refuses both with HTTP 400 ValidationException:

Request DynamoDB
TagResource, "Tags": [] Atleast one Tag needs to be provided as Input.
UntagResource, "TagKeys": [] Atleast one Tag Key needs to be provided as Input.

The service writes Atleast as one word, and the texts above keep it.

Measured in us-east-1 on 20 Nov 2026 with signed requests from the AWS SDK for Python, with its parameter validation off. The ResourceArn was the ARN of an on-demand table keyed on pk (S) in the caller's account. Each request went out twice and got the same answer both times. CreateTable with "Tags": [] creates the table on DynamoDB and on ExtendDB, so CreateTable has no difference here.

The ExtendDB answers come from the v1.0.0 release binary on SQLite (npm @extenddb/linux-x64 1.0.0, commit c2e9a32), measured the same day with the same requests, twice each. origin/main at 2ef5613 changes none of the files named below since v1.0.0.

handle_tag_resource and handle_untag_resource in crates/engine/src/tagging.rs check that ResourceArn is not empty and run validate_resource_arn. Then they pass the list to storage. Neither looks at the length of the list, so an empty list writes nothing and succeeds. The check runs in the engine before storage, so I expect the same answer on every backend. I ran SQLite only.

Not measured: the order of this check against the ARN checks and the tag key checks. One example is an empty Tags list with an ARN of another account.

Proposed change: refuse an empty Tags in handle_tag_resource and an empty TagKeys in handle_untag_resource with the two texts above. Measure the order first. Open PR #485 adds the tag key and value checks to the same handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions