The PostgreSQL authentication fixture could close its local proxy socket after reading ReadyForQuery while the authenticator was still resetting that socket's timeout, and the SocketException escaped a raw virtual thread, landing under whichever test was waiting. ProxyTestAuthentication now runs authentication and bridging through the owned ProxyTestTask, completing a future once authentication finishes, so each test waits for it before closing the socket and a worker's failure reaches the test that started it. Every raw authentication thread in PostgresProtocolHandlerTest goes through these helpers, and the test listeners bind to loopback through one loopbackServerSocket helper.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
PassedRoles read the role of twelve operations by hand: Lambda's CreateFunction and UpdateFunctionConfiguration (Role), CreateMicrovmImage and UpdateMicrovmImage (buildRoleArn), RunMicrovm (executionRoleArn), CreateNetworkConnector and UpdateNetworkConnector (OperatorRole), Step Functions' CreateStateMachine and UpdateStateMachine (roleArn), EventBridge's PutRule (RoleArn), Auto Scaling's PutLifecycleHook (RoleARN) and Application Auto Scaling's RegisterScalableTarget (RoleARN). The passed-roles generator reads each of them from botocore's model to the same member and the same service the role is passed to, so they leave its BY_HAND list, the regenerated table gives their members, and their cases and the two service constants only they used leave PassedRoles.
IAM's wording for missing and duplicate entities now matches what AWS answers. A duplicate CreatePolicy is "A policy called <name> already exists. Duplicate names are not allowed.", and a permissions boundary that names no policy, on CreateUser, CreateRole, PutUserPermissionsBoundary or PutRolePermissionsBoundary, answers "Scope ARN: <arn> does not exist or is not attachable.". A version id that names nothing on a policy that exists is named inside the attach sentence on GetPolicyVersion, DeletePolicyVersion and SetDefaultPolicyVersion, inline policies read "The user|group|role policy with name <name> cannot be found.", and instance profiles read "Instance Profile <name> ...". The wording tests share IamWordingRequests, which registers every create with PartitionCleanup.
SimulatePrincipalPolicy ignored ResourcePolicy, so a simulation answered from the identity policies alone. For an IAM user source the supplied resource policy is now evaluated through the same decide the enforcement path uses, with CallerArn, which defaults to the source user, as its principal, and its condition keys counted in MissingContextValues. Each resource's owner is the account its ARN names, otherwise ResourceOwner, otherwise the caller's account, and RoleResourceAccessAuthorizer.relationship picks the same- or cross-account rules. A role source still ignores it, as the reference says resource-based policy simulation isn't supported for roles, and CallerArn is held to its declared length.
An EKS Auto Mode node was named by its instance's private DNS name, as
managed node groups' nodes are, where AWS names Auto Mode's nodes by
their instance ID. The Ready node Floci registers for an Auto Mode
instance now takes the instance ID as its name and its
kubernetes.io/hostname label, and keeps the private DNS name as its
InternalDNS and Hostname addresses, as on AWS. Node DNS answers and
forwarding rules still use the private DNS name.
A cluster kept from before this change has its Auto Mode nodes under
their private DNS names. Once such a node registers again under its
instance ID, Auto Mode's stray-node sweep deletes the DNS-named node,
only when its provider ID is that instance's, whether the instance is
live or terminated.
CreateDistribution, GetDistribution and GetDistributionConfig dropped a
distribution's TenantConfig.ParameterDefinitions. They are now parsed,
stored and returned, with DefaultValue and Comment kept as sent and a
numeric Required (1 or 0) read as an XML boolean. The TenantConfig
subtree is read as a bounded stream: more than five definitions,
CloudFront's quota for parameters per multi-tenant distribution, or
nesting deeper than 32 levels is refused with InvalidArgument.
Closes#9580
stopTaskDuringThePullAnswersWithTheTaskStillLaunching could read STOPPED on the live task while the stop still held the task's monitor, before markTaskStopped decremented the cluster's running count, and then see a count of one. The test now checks the stop invocation and the running count while holding the same task monitor, so it reads them only once the stop has completed.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
CloudFormationCloudWatchAlarmIntegrationTest left its stack and metric alarm in the shared emulator, where later tests could find them. The stack name is now a field, the alarm is named after it, and an @AfterEach deletes the stack through CfnStackWaits.deleteStack and waits for the deletion, even when an assertion fails.
Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
S3 Tables' routes begin with literal segments (/buckets, /get-table,
/namespaces, /tables) that shadowed S3's path-style routes, so an S3
call for a bucket with one of those names reached S3 Tables. The routes
now sit under an internal prefix that only a request signed for
s3tables is rewritten onto, as Signer's and DLM's are, so a request
signed for S3 keeps its path and reaches S3.
The shared SignedServiceRoute rewrite now keeps the path's
percent-encoding, so an encoded table bucket ARN stays one path
segment, and IAM matches a moved request on that percent-encoded path.
EventBridge's storedTags answered only event-bus and rule ARNs, so aws:ResourceTag conditions on EventBridge V2 buses, subscribers and event sources saw no tags, and a Deny keyed on a tag never matched. EventBridgeService now hands an event-busv2, subscriber or event-sourcev2 ARN to EventBridgeV2Service, which reads the tags through findEventBus, findSubscriber and EventBridgeV2EventSources.lookup in the account and Region the ARN names. With V2 disabled or absent the answer stays empty.
SES v2 SendEmail accepted any additional header on a simple message,
but SES refuses the ones it sets itself. A Content.Simple.Headers entry
named From, To, Cc, Bcc, Subject, Date, Message-ID, Reply-To,
Return-Path, MIME-Version, Content-Type or Content-Disposition, in any
case, now answers 400 BadRequestException "Header <Name> is not
supported" with the name as sent, ahead of the configuration set lookup
and the sender verification. Other headers are accepted as before.
CopyDBClusterSnapshot, RestoreDBClusterFromSnapshot and the cluster
snapshot export each read the stored snapshot archive with their own
copy of the same lookup. They now share requireClusterSnapshotData,
which reads the same regional key and still answers
DBClusterSnapshotNotFoundFault (404) when the archive is missing.
Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
The REST routes generator kept ARN_SPANNING_ROUTES, a list of the operations whose controller takes an ARN label with the slashes it was sent with unencoded (API Gateway v2's tag routes, OAM's and EKS's access entry routes), and vendored their labels greedy. IAM now matches such a request on the values the router gave the path parameters of the method it dispatched to, which covers every controller that takes a label so without a list, so the list goes and the routes keep the model's labels. A route agrees with the router when its labels, given the router's values in some order, rebuild the request's path, so a value holding one of the route's own segments (an EKS principal whose IAM path holds access-entries) is still matched, where taking the one split the spanning pattern finds would match no route.
OAM's tag requests reach the shared tags controller, which serves no OAM tagging, so an OAM ARN sent unencoded is no longer checked as OAM's before that controller refuses it. The tests give the router's values where a request is unencoded, and an API Gateway v2 tag request with an unencoded ARN is checked through the router.
#9623 moved MQTT shadow requests to the device certificate's account and
Region, but the broker still fanned each shadow reply out to every live
session whose subscription matched, so a device of another account
received the shadow's document. Shadow replies now go only to the
sessions of the shadow's account and Region, as AWS keeps each account's
topic namespace apart in each Region, and a message with no owner counts
in the default account and Region rather than in all of them.
Shadow events also evaluated their topic rules on the broker's rule
worker with no request scope, so the default account's rules fired and
the device account's never did. Each shadow event now evaluates its
rules, and runs their actions, as the shadow's account and Region.
The shadow paths now read, write and delete as the shadow's account. A
shadow saved before stores kept accounts apart sits under its bare key
and belongs to the default account, so only the default account finds
it and moves it under its own key on that first read.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
DescribeStandards ignored MaxResults and NextToken and always returned
the whole catalogue. It now pages through the shared Pagination helper
in catalogue order, returns a NextToken while standards remain, and
refuses a MaxResults outside 1 to 100 with InvalidInputException.
Closes#7607
CreateDBInstance waited for the Docker backend before answering, so a
client with the SDK's default timeouts could retry a create that had
already succeeded and get DBInstanceAlreadyExists. It now stores the
instance and answers creating, as AWS does. DescribeDBInstances sees the
record while a background worker starts the container and proxy outside
the instance lock, and the worker publishes the backend only if the same
instance is still creating.
ModifyDBInstance and RebootDBInstance refuse a creating instance with
InvalidDBInstanceState and AWS's messages. A delete accepted during
startup keeps the record and the caller's backup choice until the worker
has torn down what it started, and after a restart Floci reopens the
PostgreSQL volume to save a retained backup before removing it. A state
reset waits up to 15 seconds for pending starts and otherwise refuses
with 503 from checkReset, before any container stops.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
IamActionRegistry kept 12 hand route rules: six for RDS Data, five for Resource Groups and a catch-all for Kinesis. RDS Data and Resource Groups now have their botocore routes vendored, and RDS Data joins the namespaces whose request resources are read, its model being what kept it out. Resource Groups' requests were already read, and the routes match them on the model's own path, without the /_rg prefix its route filter moves them under.
RDS Data's rules gave the action alone, so a statement was checked on every resource and a grant scoped to a cluster refused it even on that cluster. It is checked on the cluster its resourceArn names now, as AWS does. A secret's ARN is no cluster's, and a commit, a rollback and a statement inside a transaction now read their request's secret as every other call already did, refusing one Secrets Manager cannot read (SecretsErrorException, which AWS models on them), so a cluster's ARN given as the secret cannot stand in for the database the call runs on. A statement on a DB instance, which Floci serves and AWS's Data API does not, names no resource the check reads, so it is checked on *.
The authorized actions list RDS Data and Resource Groups among the routed scopes.
The Kinesis rule checked any POST with no X-Amz-Target as kinesis:*, an action no policy grants by name. Kinesis serves no such request, so it goes, as the rule machinery does, no rule being left.
IamActionRegistry kept 135 hand route rules for Lambda, Lambda MicroVMs and Lambda Web Functions. The generated REST routes, read from botocore, map every route those controllers serve to the same action, except where a controller takes a label's value with the slashes it was sent with unencoded: a durable execution's ARN and a callback id ({arn: .+}, {callbackId: .+}) and a Web Function's ARN ({resourceArn: .+}, {resource: .+}), where the model gives each label one segment. The rules' .+ took those.
A request that matches no route with each label taking one segment is now matched again with each label spanning the segments its value holds, and only a route whose labels the path then gives the values the router gave the path parameters of the method it dispatched to is its match: the route of the operation that runs. That needs no list of the labels a controller lets span. A request the shared tagging controllers serve keeps its match as it was: they serve a service only on the routes its model gives, so the values their own paths take name none of the service's. With that, the rules go, and none of Lambda's is left. The rule-precedence test moves to an RDS Data rule.
The reactive S3 sync listed functions in the default Region only, so a function created in any other Region never picked up new code when its S3 object changed. The observer now scans every Region's functions and syncs each one in the Region its ARN names, under its own account.
Buckets are per account unless the global bucket namespace is on, so two accounts can own same-named buckets, and matching by bucket name and key alone let an upload to one account's bucket redeploy another account's function. The observer now resolves the bucket written in the uploader's account and syncs a function only when its owner resolves its code bucket to the same owning account; with the global bucket namespace both resolve to the one bucket, so a shared code bucket still redeploys every function that uses it.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
A shadow request published on a $aws/things/.../shadow topic always read
and wrote the shadow of the default account and region, so a device whose
certificate is registered in another region updated a shadow that
GetThingShadow in its own region never saw. The broker session already
carries the account and region of the device's certificate; the reserved
topic handler now takes them and reads, writes and deletes the shadow
there. A plaintext session keeps the default account and region, as
before.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
The empty or blank position check lived in getRestApiPage alone, so GetRestApis refused position= while the other collections paged by pageById served their first page for it. The rule now lives in pageById, so GetRestApis, GetResources, GetDeployments, GetAuthorizers, GetRequestValidators, GetModels, GetDocumentationParts, GetUsagePlans, GetUsagePlanKeys, GetBasePathMappings and GetVpcLinks all answer BadRequestException: Invalid position parameter, and the controller reads an explicitly empty position from the URI for each of them through one requestedPosition helper.
IamActionRegistry kept 70 hand route rules for EKS. The generated REST routes, read from botocore, map every EKS route to the same action, except the access entry routes Floci's controller serves with the principal ARN unencoded: it takes the principal as {principalArn: .+} and a cluster access policy ARN after it with its slash sent as it is or encoded, where the model gives each one segment. Those six operations join ARN_SPANNING_ROUTES, as API Gateway v2's and OAM's tag routes are, so their labels span the slashes.
A DELETE on a principal whose IAM path holds an access-policies segment matches both DeleteAccessEntry's route and DisassociateAccessPolicy's, which outranks it, while EKS's router takes it as a disassociate only when a cluster access policy ARN follows. A request is now matched, of the routes it matches, to the one whose labels the path gives the values the router gave the path parameters of the method it dispatched to, when there is one: the route of the operation that runs. With that, the rules go, and none of EKS's is left.
Renaming an AWS::RDS::DBSubnetGroup created the new group in the stack's
Region but deleted the old one through the region-less overload, which
uses the default Region. A stack outside the default Region left its old
group behind and could delete a same-named group in the default Region.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Cloud Map lists were filtered by region, but every operation that names a namespace, service or operation by id or ARN fetched it by the bare id, so a request signed for one region read, changed or deleted another region's resource. AWS keeps Cloud Map resources per account and region. GetNamespace, DeleteNamespace, CreateService, GetService, DeleteService, the instance operations, GetOperation and the tag operations now answer a record only in the region recorded for it, with the not-found error each operation declares (NamespaceNotFound, ServiceNotFound, OperationNotFound, ResourceNotFoundException). A record stored without a region is answered in every region, as it was.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Wait for the busy container's first stop worker to exit before releasing it. The shutdown deadline can expire while that worker still owns cleanup, so the retry check could run before the failed removal was recorded.
Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
S3 answers a bucket only in its own Region. A SigV4 request signed for
another Region now gets 301 PermanentRedirect with the bucket's Region in
x-amz-bucket-region and Bucket and Endpoint in the error, and a HEAD gets
the status and header with no body, which is what the SDKs' redirect
handling follows. ListBuckets, GetBucketLocation and CreateBucket are served
from every Region, and unsigned, presigned and SigV4A requests and buckets in
another partition are served as before. A bucket stored without a Region is
redirected from the default one, where ListBuckets reports it.
floci-duck now signs each bucket's requests for that bucket's Region through
temporary DuckDB secrets that end with the request, so Athena, S3 Select,
Redshift and the CUR reports keep reading and writing buckets outside the
default Region.
floci.services.s3.region-redirect (FLOCI_SERVICES_S3_REGION_REDIRECT,
default true) turns the redirect off.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Each EKS Auto Mode node now has a karpenter.sh/v1 NodeClaim, as Karpenter
keeps one on AWS, so kubectl get nodeclaims and tools that watch claims see
Auto Mode's nodes.
The claim is named after its pool with a five-character suffix, chosen at
launch so no other instance's claim has it and kept in the instance's
karpenter.sh/nodeclaim tag. It is owned by its NodePool, held by the
karpenter.sh/termination finalizer and labelled as its node is. Its spec
carries the pool's requirements, its pods' requests, and expireAfter and
terminationGracePeriod (336h and 24h0m0s when the pool doesn't say). Its
status goes Launched, then Registered, Initialized and Ready once the node
joins.
A claim whose instance is gone loses Karpenter's finalizer and is deleted, and
a missing one is made again without a new launch. Deleting a claim drains and
removes its node and terminates its instance, as deleting a pool does. A
NodePool being deleted launches nothing more. Only claims labelled
app.kubernetes.io/managed-by: eks are touched.
GetTemplateSummary now returns each parameter's AllowedValues under ParameterConstraints, and an empty ParameterConstraints element when the template sets none, as AWS does.
Closes#9510
MySQL authentication can forward a backend verdict before resetting its
socket timeout, so the fixture could close that socket while the driver still
used it. Close the client first, await the authentication and backend
drivers, then release their sockets. Driver failures are captured in
FutureTask results, so they fail the test that owns them.
ProxyTestTask now holds the task result, bounded await and cleanup for both
the MySQL and PostgreSQL protocol fixtures, and ProxyTestTaskTest checks its
failure propagation and virtual thread once.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
IamActionRegistry kept 38 hand route rules for EventBridge Scheduler, EventBridge Pipes and Aurora DSQL. The generated REST routes, read from botocore, map every one of their modeled routes to the same action, so the rules only reached the bare /tags path beyond them. The shared tags controller refuses that path for these three services, as their models give tagging on /tags/{resourceArn} alone, so the rules go.
The tests that expected IAM to check the bare /tags for them now check the route each model gives, and the body-versus-query check of POST /tags moves to FIS, whose generated routes give the bare path the shared controller serves.
A states:startExecution task (and its .sync forms), or an aws-sdk:sfn startExecution or startSyncExecution task, whose StateMachineArn names a state machine in another Region started it with an execution ARN in the parent's Region. AWS documents that "Cross-Region AWS SDK integration and cross-Region AWS resource access aren't available in Step Functions" (Developer Guide, "Accessing cross-account AWS resources in Step Functions"), so the task now fails before anything starts. AWS does not name the error; the task fails with the one it reports for a state machine of an account it cannot reach.
The Region check sits in NestedTaskCredentials.validateTarget, beside the account check, and takes its error name from accessDenied. validateTarget strips .waitForTaskToken before it parses the resource, so every callback form, optimized or AWS SDK, gets the Region check too; the account check still skips callback tasks, as before.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Exercise DescribeDocument after updating a document and reading it back by version in commercial and GovCloud regions. The SDK decodes the creation timestamp of both $LATEST and version 1, and version 1 keeps its original timestamp.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
The concurrent COPY JOB capacity test polled pg_stat_activity through the transaction holding the conflicting lock, and PostgreSQL keeps one view of the current queries for the whole transaction, so the competing session's lock wait could stay hidden. It now observes from a separate autocommit connection, releases the locking transaction before draining its own executor, and requires the SQLSTATE 54000 rejection; the capacity assertions are unchanged.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The test stubbed FlociDuckClient.execute a second time after releasing the first query's worker, which could still be calling the mock. Mockito's doAnswer().when() stubbing is not thread safe, so a concurrent call left the stubbing unfinished (UnfinishedStubbing). One answer now blocks the first execution and fails every later one, so nothing is restubbed while a worker is live.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Three background workers ran outside any request scope, so their calls went to the default account and a resource in any other account was never served. Each now runs as the account that owns its resource, in that resource's region.
The alarm evaluator lists the metric alarms of every account with the account that owns each, and evaluates each one as that account in the alarm's region, so its metric, its state change and its SNS or scaling actions are that account's.
A CodeDeploy deployment's state machine thread captures the creating account at submit and runs as it in the deployment's region, so the Lambda alias shift, the ECS task-set calls and the EC2 and SSM lookups act on that account's resources. The in-memory deployments are keyed by account and region, so another account can no longer read them.
The MWAA DAG-sync poller runs each environment's sync as the environment's account in its region, so the DAG prefix and requirements file come from that account's buckets.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
With floci.services.rds.endpoints-in-vpc on, a DB proxy's default endpoint
is served at its own address in the first of its subnets, under the name
RDS gives it, <proxy>.proxy-<identifier>.<region>.rds.<dnsSuffix>, and each
endpoint added to it at its own address in its own subnets, under
<endpoint>.endpoint.proxy-<identifier>. Each serves the engine family's
port, as "all proxies listen on port 5432 for PostgreSQL" and "on port
3306 for MySQL", so two proxies can both serve 5432; a relay forwards to
the proxy's listener, which takes a free port in the proxy range.
DescribeDBProxies and DescribeDBProxyEndpoints report the names, which
Floci's DNS server answers as soon as the proxy or endpoint exists. An IAM
token generated for any of a proxy's endpoints is good at the proxy, and
the proxies' certificate covers the names. A renamed endpoint answers by
its new name. Deleting an endpoint or the proxy removes its names and then
its relays; one Docker does not confirm removed stays tracked, keeping its
port from other databases, until Floci stops or restarts. A restart serves
them again at the addresses they had, and moves them in or out of the VPC
as the setting now says.
RdsEndpointAddresses gains a relay and name API for endpoints that are not
an instance's, with a best-effort discard, and reaches() replaces
namesCluster() for both clusters and proxies.
Closes#6273
An edge-optimized custom domain reports only its CloudFront distribution: the AWS CLI's create-domain-name example 1 (an EDGE domain) returns distributionDomainName and distributionHostedZoneId and no regional field. Floci wrote regionalDomainName and regionalHostedZoneId, and any regional certificate, on every domain. They are now serialized for regional domains only; the stored regional name is kept, because the custom domain filter still routes on it.
The two routing tests that address a domain through its .regional.local host now create a REGIONAL domain. The GetDomainNames assertion now finds the domain under item, and a new case creates an EDGE domain with a regional certificate name and ARN and checks that CreateDomainName, GetDomainName and GetDomainNames leave all four regional fields off. The custom-domain guide no longer says every domain reports a regionalDomainName and both certificate ARNs.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Use the established signal-aware sleeper so discovery assertions do not wait for a 30-second Docker stop grace period. Production behavior and assertions are unchanged.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
AWS's Service Reference lists iam:PassRole for twelve API Gateway
operations, each passing its roles to apigateway.amazonaws.com. Floci
checked none: API Gateway is authorized by HTTP method, the passed-roles
table left the namespace out, and no member naming a role has a name the
table's rule knows (credentials, authorizerCredentials, credentialsArn,
authorizerCredentialsArn). An update names its role as a patch
operation's value, and an import inside its OpenAPI definition.
The roles are now checked for the operation the request's route resolves
to, which the table is keyed by, from three readings. A new vendored
source, tools/aws/sources/apigateway-roles.json, written by its own
script from the API references and developer guide, gives what they
read:
- The members that take a role, by the resource type each describes:
"To specify an IAM role for API Gateway to assume, use the role's
Amazon Resource Name (ARN)". PutIntegration, CreateIntegration,
CreateAuthorizer, CreateApi and UpdateApi read them, REST APIs' and
HTTP APIs' alike.
- A REST API update's patch operation, which names the property it
changes by its path ("the path for this property is /name"): the
value of the one whose path names a role member of the resource the
update returns, so UpdateIntegration reads
patchOperations[path=/credentials].value, UpdateAuthorizer
/authorizerCredentials and UpdateAccount /cloudwatchRoleArn. The
table gains a list step selecting the elements whose field holds a
value.
- An import's OpenAPI definition, JSON or YAML: the
x-amazon-apigateway-integration credentials of each Operation object,
the ANY method's included, and the x-amazon-apigateway-authorizer
authorizerCredentials of each security scheme, OpenAPI 2's and 3's,
where the guide says each extension sits. ImportRestApi and PutRestApi
take the whole body as the definition, ImportApi and ReimportApi a
body member. The definition is read as its service takes
and reads it, through a new PassedRoleLookup hook given the whole body:
API Gateway resolves a REST API definition's ${AWS::Region},
${AWS::AccountId} and ${AWS::Partition} before importing it, so a role
written with them is checked too, and takes an HTTP API's from its
body's body (the REST route's envelope) or Body (the JSON 1.1
handler's), or else the whole body, which the REST route also takes.
A REST JSON model's member is also read by its botocore name where its
wire name differs: Floci serves HTTP APIs over JSON 1.1 too
(AmazonApiGatewayV2.*), whose bodies name members as botocore does
(CredentialsArn, Body), and its handler takes either spelling as the
same member.
apigateway joins the passed-roles namespaces with all twelve operations
read and nothing added to the hand lists.