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
fix(ssm): InvalidResourceId is a 400, not a 404 #933
SSM answers InvalidResourceId with HTTP 404. AWS publishes 400. Split out of #932 on the
reasoning #921 (ACM), #923 (KMS) and #930 (Secrets Manager) established: correcting which resource
an identifier names is a different change from correcting what status a refusal carries, and a wire
status is a compatibility surface a consumer may already assert.
Verified
From API_AddTagsToResource
(and identically at API_RemoveTagsFromResource and API_ListTagsForResource):
Code
HTTP Status Code
InternalServerError
500
InvalidResourceId
400
InvalidResourceType
400
TooManyTagsError
400
TooManyUpdates
400
SSM publishes no distinct not-found code for these three operations — InvalidResourceIdis
how a nonexistent resource is reported, and it is a 400.
Where
After #932 the status lives in one place: the ssmInvalidResourceID helper in emulator/ssm_tags.go, which all three tag operations route through. Before #932 it was written
inline at emulator/ssm_plugin.go:660, :702 and :741.
The rest of the SSM plugin is not in scope here and is not audited by this issue; other operations
(GetParameter's ParameterNotFound, PutParameter's ParameterAlreadyExists) carry their own
codes and their own statuses, which AWS publishes separately.
A test asserts 400 on the wire — not through a decoded struct — for each of AddTagsToResource, RemoveTagsFromResource and ListTagsForResource against a parameter that
does not exist.
The doc comment on the helper stops citing this issue as pending.
CHANGELOG.md records it under ### Fixed, and docs/services.md's SSM row states the status
alongside the code, since a caller's retry logic branches on it.
Activity
fix(ssm): a tag call resolves to the resource type it names (#932) (#934
fix(ssm): InvalidResourceId is a 400, not a 404 (#933) (#945)