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 }}
Repository navigation
EC2: CreateTags accepts reserved aws:-prefixed tag keys that real EC2 rejects #452
Real EC2 rejects a CreateTags request whose key starts with aws::
InvalidParameterValue: Tag keys starting with 'aws:' are reserved for internal use
The Tag your resources page confirms the prefix is reserved — "reserved for AWS use… you can't edit or delete" — and that such tags do not count against the 50-tag limit.
Substrate accepts them. A consumer's error branch for the reserved-prefix rejection is therefore unreachable, and a test of it passes vacuously.
Why this was deliberately deferred
Filed out of the #443 work rather than fixed alongside it. Before v0.84.0 stamped aws:ec2:fleet-id automatically, applying that tag by hand was the parsl-aws-provider workaround for having no fleet→instance route at all. Tightening CreateTags in the same release that removed the need for the workaround would have broken that consumer on upgrade with no overlap window.
v0.84.0 makes the workaround unnecessary. This can land one release later, giving consumers a window to drop it.
Acceptance criteria
CreateTags with a key matching aws: (case-insensitive — confirm against the AWS reference) fails with InvalidParameterValue, HTTP 400, and AWS's message.
The check applies to every resource type CreateTags accepts, not just instances.
Shipped in v0.85.0 (#463). Three things worth reporting back, one of which corrects the issue.
The prefix match is case-sensitive, not case-insensitive
The issue asks to confirm whether the match should be case-insensitive. It should not. The EC2 Tag your resources → Tag restrictions page states that tag keys and values are case-sensitive, and every observed rejection quotes the lowercase form:
Tag keys starting with 'aws:' are reserved for internal use
So AWS:foo and Aws:foo are ordinary user tags and are accepted. A case-folded check would have traded the infidelity you reported for a new one in the opposite direction — rejecting a tag AWS permits. There are explicit test cases pinning AWS:foo, Aws:foo, aws-foo and awsfoo as accepted, and bare aws: with an empty suffix as rejected.
The DeleteTags answer is a documentation inference, not a captured error
You asked what DeleteTags should do. Substrate now applies the same check there, but the evidence is weaker than for CreateTags and it is worth you knowing which is which:
CreateTags — the code and message come from two independent captures of real-AWS responses, byte-identical, one recording Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue. Note that both captures are of RunInstances tag-on-create rather than CreateTags; the message is evidently shared across the tagging paths, but substrate has not observed it on CreateTags directly.
DeleteTags — no captured error was found. The code and message are inherited from the CreateTags capture. What the documentation does state unambiguously is the outcome: such a tag "can't be edited or deleted" by a caller. A DeleteTags that returned success while leaving the tag in place would be its own infidelity, so refusing is the closer of the two available behaviours.
docs/services.md and the CHANGELOG both state this plainly rather than implying a doc citation. If you have a captured DeleteTags rejection, it would firm this up.
The 50-tag exemption is vacuous today
The issue asks that reserved tags not count against the 50-tag-per-resource limit. That is currently true only because the limit does not exist — TagLimitExceeded fires nowhere in substrate. Filed as #469 rather than bundled here, because it needs its own semantics: reserved tags exempt from the count, and the rule that real AWS still permits overwriting an existing key on a resource that already has 50 tags. A check written as len(existing) + len(new) > 50 gets that second one wrong.
Also deliberately not covered
RunInstances tag-on-create is unrestricted, which is a real remaining gap given that both captures above are from that operation. It is blocked on substrate's own fleet path: launchFleetPool stamps aws:ec2:fleet-id (#443) by building a synthetic RunInstances param map, so restricting that parse would reject substrate's own tagging and silently remove the only route from an instant fleet back to its instances — which is the thing #443 existed to give you. Filed as #468 with the restructuring it needs. A regression test pins that a fleet still stamps the tag and that DescribeInstances filtered on tag:aws:ec2:fleet-id still returns its instances.
Behaviour you can rely on
The whole request is refused before any resource is modified. CreateTags accepts up to 1000 resource IDs, and rejecting partway through the apply loop would leave a prefix of them tagged — a state real EC2 never produces. A request mixing one legal tag with one reserved tag leaves every resource it named untouched, asserted directly.
Activity
feat(ec2): reject reserved aws:-prefixed tag keys (#452) (#463)
scttfrdmn commentedon Aug 2, 2026
Shipped in v0.85.0 (#463). Three things worth reporting back, one of which corrects the issue.
The prefix match is case-sensitive, not case-insensitive
The issue asks to confirm whether the match should be case-insensitive. It should not. The EC2 Tag your resources → Tag restrictions page states that tag keys and values are case-sensitive, and every observed rejection quotes the lowercase form:
So
AWS:fooandAws:fooare ordinary user tags and are accepted. A case-folded check would have traded the infidelity you reported for a new one in the opposite direction — rejecting a tag AWS permits. There are explicit test cases pinningAWS:foo,Aws:foo,aws-fooandawsfooas accepted, and bareaws:with an empty suffix as rejected.The
DeleteTagsanswer is a documentation inference, not a captured errorYou asked what
DeleteTagsshould do. Substrate now applies the same check there, but the evidence is weaker than forCreateTagsand it is worth you knowing which is which:CreateTags— the code and message come from two independent captures of real-AWS responses, byte-identical, one recordingService: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue. Note that both captures are ofRunInstancestag-on-create rather thanCreateTags; the message is evidently shared across the tagging paths, but substrate has not observed it onCreateTagsdirectly.DeleteTags— no captured error was found. The code and message are inherited from theCreateTagscapture. What the documentation does state unambiguously is the outcome: such a tag "can't be edited or deleted" by a caller. ADeleteTagsthat returned success while leaving the tag in place would be its own infidelity, so refusing is the closer of the two available behaviours.docs/services.mdand the CHANGELOG both state this plainly rather than implying a doc citation. If you have a capturedDeleteTagsrejection, it would firm this up.The 50-tag exemption is vacuous today
The issue asks that reserved tags not count against the 50-tag-per-resource limit. That is currently true only because the limit does not exist —
TagLimitExceededfires nowhere in substrate. Filed as #469 rather than bundled here, because it needs its own semantics: reserved tags exempt from the count, and the rule that real AWS still permits overwriting an existing key on a resource that already has 50 tags. A check written aslen(existing) + len(new) > 50gets that second one wrong.Also deliberately not covered
RunInstancestag-on-create is unrestricted, which is a real remaining gap given that both captures above are from that operation. It is blocked on substrate's own fleet path:launchFleetPoolstampsaws:ec2:fleet-id(#443) by building a syntheticRunInstancesparam map, so restricting that parse would reject substrate's own tagging and silently remove the only route from aninstantfleet back to its instances — which is the thing #443 existed to give you. Filed as #468 with the restructuring it needs. A regression test pins that a fleet still stamps the tag and thatDescribeInstancesfiltered ontag:aws:ec2:fleet-idstill returns its instances.Behaviour you can rely on
The whole request is refused before any resource is modified.
CreateTagsaccepts up to 1000 resource IDs, and rejecting partway through the apply loop would leave a prefix of them tagged — a state real EC2 never produces. A request mixing one legal tag with one reserved tag leaves every resource it named untouched, asserted directly.chore(release): v0.85.0 (#467)
feat(ec2): reject reserved aws: tag keys on tag-on-create (#468) (#478)