Files
floci/docs
Priamo Germosen 4d0287e6dc fix(iam): check DMS requests on the resources they name, from the DMS User Guide's ARN syntax (#9857)
The Service Reference ends every DMS resource type's ARN format in a wildcard where the resource goes
(arn:${Partition}:dms:${Region}:${Account}:endpoint:*), which the table reader matches as written, so no DMS request
was checked on the resource it names: one naming an endpoint, an instance or a task by its ARN stayed on *, and no
aws:ResourceTag condition on a DMS resource could match.

The DMS User Guide gives what goes there: "An ARN for an AWS DMS resource uses the following syntax:
arn:aws:dms:region:account number:resourcetype:resourcename". tools/aws/fetch_dms_arn_formats.py vendors that page
(the syntax, the sentence saying what its resource name is, and its table of formats) into
tools/aws/sources/dms-arn-formats.json, pairs the syntax with each Service Reference DMS format ending in a wildcard
by its resource type, and writes that format with the page's placeholder where the wildcard was
(arn:${Partition}:dms:${Region}:${Account}:endpoint:${resourcename}). A reworded page, or a table row whose type no
such format has, is refused. regen_iam_request_resources.py takes those formats as they stand (ARN_FORMAT_SOURCES,
granted for dms alone), each checked to differ from the Service Reference's only where its wildcard was, and verifies
the source against the live pages beside the other vendored sources.

The generator's existing machinery then names a DMS resource by the ARN a request passes, or fills the format from
the identifier a request names it by. DmsStoredResourceArns finds such an identifier, or an ARN DMS holds, as DMS
stores it (an endpoint's, an instance's or a task's ARN ends in the id DMS minted, not in its identifier; one stored before keys carried the account is the default account's and found too), and reads
the tags of an endpoint, instance, task or subnet group for aws:ResourceTag, both in place. A subnet group's ARN
ends in its identifier as DMS stores it, in lower case ("This value is stored as a lowercase string"), so the reader
resolves an ARN naming one in another case to that one (resolveStoredArn). A request leaving out
an optional ARN names the resource DMS uses for one naming none, of which it has none. A replication instance whose create
names no subnet group goes into the account's default replication subnet group, so the reader answers that group as
the one such a create acts on (findImplicitDefault), and the create is checked on subgrp:default.

The fetcher also copies what AWS answers each DMS create with, from AWS's recorded exchanges with DMS (the AWS
Emulator evaluation suite's wire tests, "a recorded exchange with AWS") and botocore's examples: whether the ARN of
what the create makes ends in a member of its request (a subnet group's in its ReplicationSubnetGroupIdentifier, an
event subscription's in its SubscriptionName) or in a value the request does not give (an endpoint's, an instance's,
a task's, a certificate's: botocore's example answers EndpointIdentifier "test-endpoint-1" with
endpoint:RAAR3R22XSH46S3PWLC3NJAWKM). The generator's rule for a variable a create's response answers, which stays open
whatever member a rule would fill it from, reads that too (with_recorded_mints), both for what a create is checked
on and for what its tags are checked on: CreateEndpoint, CreateReplicationInstance and ImportCertificate are checked on
what they make with its id open (rep:*), the tags of CreateReplicationTask, CreateDataProvider and
CreateInstanceProfile on what they make likewise, and no other row of the table changes. The creates of data
migrations, migration projects, replication configs and assessment runs have no recorded answer and keep their
fills. A modify renaming an instance is still checked on rep:<new name> beside its own ARN, nothing
being recorded for it.

The regeneration also takes the Service Reference's new SageMaker candidate, leaderboard and model monitor config
actions.
2026-11-30 19:32:58 -04:00
..
2026-03-15 17:43:56 -05:00