Repository navigation
Description
Follow-up from #452, which restricted the reserved aws: prefix on CreateTags/DeleteTags only.
The gap
Real EC2 rejects a reserved key on RunInstances tag-on-create as well — in fact both captures #452 rests on are from RunInstances, not CreateTags:
Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue
Tag keys starting with 'aws:' are reserved for internal use
Substrate accepts it there. runInstances parses TagSpecification.N in its own loop (emulator/ec2_plugin.go) and does not route through createTags, so #452's check never runs on that path. Same for any other tag-on-create surface that parses TagSpecification.N independently.
Why #452 deliberately left it
launchFleetPool (emulator/ec2_fleet.go) stamps aws:ec2:fleet-id (#443) by building a synthetic RunInstances param map via fleetIDTagSpec and calling p.runInstances directly. Restricting the request-level parse would reject substrate's own fleet tagging, silently undoing the only route from an instant fleet back to its instances. #452 has a regression test pinning that a fleet still stamps and still filters on the tag.
What closing this needs
The fleet path restructured so it does not ride the request-level TagSpecification.N parse — e.g. stamping the tag after the instances exist, or a separate internal entry point that takes already-parsed tags.
Not a bypass flag. An internal "skip the validation" switch on the request would make the emulator's behaviour depend on state a consumer cannot see or set, which is the opposite of what the deterministic-replay property is for.
Acceptance criteria
-
RunInstanceswithTagSpecification.N.Tag.M.Key=aws:fooreturnsInvalidParameterValue, HTTP 400,Tag keys starting with 'aws:' are reserved for internal use - No instance is launched when the request is rejected
- A fleet still stamps
aws:ec2:fleet-id, andDescribeInstancesfiltered ontag:aws:ec2:fleet-idstill returns its instances - The same check covers the other
TagSpecification.Nparsers, or the ones left out are named with a reason -
docs/services.mdupdated; the provenance stays stated as observed real-AWS behaviour rather than a doc citation
Activity
feat(ec2): reject reserved aws: tag keys on tag-on-create (#468) (#478)
feat(sqs): validate message attributes against their documented rules (…