fix(iam): check each layer a Lambda function adds as lambda:GetLayerVersion (#9769)

The Service Reference lists lambda:GetLayerVersion among the actions CreateFunction and UpdateFunctionConfiguration
are authorized by, and the Lambda Developer Guide says what it is checked on: "Make sure that you have permission to
call the GetLayerVersion API on the layer version". Floci checked neither operation as it, so a caller allowed to
create or update functions added any layer version of its account, whatever its policies said about reading it.

tools/aws/fetch_lambda_layer_permissions.py vendors that sentence from the adding-layers page, with the action and
the resource it names, and refuses a page asking for permission to call an API in any other wording. The
request-resources generator reads it (api_permission_resources): an operation the Service Reference lists as
authorized by that action is also checked as it on each value of the request's member holding botocore's ARN shape
for the type the words name (`<Type>Arn`, as minted_types reads it; `Layers`, a list of `LayerVersionArn`, for a
`layerVersion`). CreateFunction and UpdateFunctionConfiguration now check lambda:GetLayerVersion on each layer
version their Layers give, and a request giving none is not checked as it; no other operation changes.
--verify reports an operation checked so whose action the Service Reference stops listing (verify_api_actions).

CreateFunction is the first operation checked by parts that also tags what it creates, so IamEnforcementFilter now
checks an operation's own action, where it is one of the parts, as it would be alone: with the request's tags
(aws:RequestTag, aws:TagKeys) and carried values, not the bare part context. The checks made after it, the tagging
action a create also needs, a companion and a forwarded action, are made on the resources that action was checked on,
not on *, so lambda:TagResource is again checked on the function a tagged create makes.

Another account's layer version is checked on its ARN alone: LambdaStoredResourceArns answers reachedInItsAccount
for it, as Lambda reads such a layer in its owner's account through the owner's policy and never as the caller's layer
of that name, where IAM also checked the caller's same-named layer before (GetLayerVersionByArn too).

The table is regenerated against today's Service Reference too, which the online gate this change runs requires: AWS
added SageMaker's leaderboard and model-monitor-config types (their ARN formats and tag keys, and the types of
AddTags, DeleteTags and ListTags) and lists a backup-external namespace the table does not read.

The docs and two comments in LambdaService and LambdaLayerService no longer say Floci implements no layer
permissions.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-29 16:49:45 -04:00
1 parent f1b47125de
commit 6563e6a315
16 files changed
+638 -46

No files matched your search

+3
View File
@@ -118,6 +118,9 @@ on:
- 'tools/aws/fetch_secretsmanager_required_permissions.py'
- 'tools/aws/sources/secretsmanager-required-permissions.json'
- 'tools/aws/test_fetch_secretsmanager_required_permissions.py'
- 'tools/aws/fetch_lambda_layer_permissions.py'
- 'tools/aws/sources/lambda-layer-permissions.json'
- 'tools/aws/test_fetch_lambda_layer_permissions.py'
- 'src/main/resources/aws/rest-routes.json'
- 'tools/aws/regen_rest_routes.py'
- 'tools/aws/test_regen_rest_routes.py'
+2
View File
@@ -678,6 +678,8 @@ IAM_REQUEST_RESOURCES_PATHS := src/main/resources/aws/iam-request-resources.json
tools/aws/test_fetch_sqs_redrive_permissions.py \
tools/aws/sources/secretsmanager-required-permissions.json tools/aws/fetch_secretsmanager_required_permissions.py \
tools/aws/test_fetch_secretsmanager_required_permissions.py \
tools/aws/sources/lambda-layer-permissions.json tools/aws/fetch_lambda_layer_permissions.py \
tools/aws/test_fetch_lambda_layer_permissions.py \
tools/aws/sources/required-resource-types.json tools/aws/fetch_required_resource_types.py \
tools/aws/test_fetch_required_resource_types.py
CLOUDTRAIL_S3_DATA_EVENTS_PATHS := src/main/resources/aws/cloudtrail-s3-data-events.json \
+7 -1
View File
@@ -2974,7 +2974,13 @@ CodeArtifact's destination repository is its `destinationRepository`. So `StartM
script vendors (`tools/aws/fetch_secretsmanager_required_permissions.py`) for each operation the Service Reference
lists as authorized by another of its actions: an action needed when the request does something ("If you use filters,
you must also have secretsmanager:ListSecrets") when it carries the member the words name (`Filters`), and one it
always needs ("secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy") on what it names. A package a request names with no `namespace` is checked with its namespace empty, as the guide writes
always needs ("secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy") on what it names. A Lambda
operation the Service Reference lists as authorized by an action is also checked as it on the resource the Lambda
developer guide asks permission to call that action's API on, which its own script vendors
(`tools/aws/fetch_lambda_layer_permissions.py`): "Make sure that you have permission to call the GetLayerVersion API
on the layer version". The resource is each value of the request's member holding botocore's ARN shape for its type
(`LayerVersionArn`), so `CreateFunction` and `UpdateFunctionConfiguration` are checked as `lambda:GetLayerVersion` on
each layer version their `Layers` give, and a request giving none is not checked as it. A package a request names with no `namespace` is checked with its namespace empty, as the guide writes
such an ARN (`package/my_domain/my_repo/npm//react`), and a package group by its pattern percent-encoded as
CodeArtifact writes it into the group's ARN (`/npm/team/*` is `/npm/team/%2a`): a variable the reference names
`Encoded` and a botocore shape's name is filled from the member of that shape and encoded as its service encodes it.
+11 -3
View File
@@ -610,9 +610,9 @@ An ARN naming another account or another partition is answered on the live servi
resource policy: an AWS-managed public layer resolves, and everything else is
`AccessDeniedException`. Measured on `CreateFunction` in ap-southeast-1, a foreign-account ARN and
a cross-partition ARN return the same `AccessDeniedException`, so Floci returns that for both.
Floci implements no layer permissions and cannot fetch real AWS content, so it cannot tell a
public layer from a private one; refusing is the faithful default, being the answer AWS gives to
every foreign ARN except a public one.
Floci cannot fetch real AWS content, so it cannot tell a public layer from a private one, and it does
not yet resolve another account's layer its owner granted (see Layer permissions below); refusing is
the faithful default, being the answer AWS gives to every foreign ARN except a public or granted one.
Set `floci.services.lambda.accept-external-layer-arns: true`
(`FLOCI_SERVICES_LAMBDA_ACCEPT_EXTERNAL_LAYER_ARNS`) to record a same-partition foreign ARN on the
@@ -644,6 +644,14 @@ AWS's "the owner of that account must grant your account permission in a resourc
Reading another account's layer version once granted is not served yet: `GetLayerVersionByArn` still
resolves a layer only in the caller's own account.
**Layers under IAM enforcement:** `CreateFunction` and `UpdateFunctionConfiguration` are also
checked as `lambda:GetLayerVersion` on each layer version their `Layers` give, as the developer
guide's "Make sure that you have permission to call the GetLayerVersion API on the layer version"
says, so a caller allowed to create or update functions but not to read a layer version is refused
that layer. A request giving no `Layers` is not checked as it. Another account's layer version is
checked on its own ARN alone, against its owner's policy, never as a same-named layer of the
caller's, as Lambda never substitutes one.
## Provisioned concurrency
Published versions with `SnapStart.ApplyOn=PublishedVersions` reject provisioned concurrency
@@ -50,6 +50,7 @@ import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -614,6 +615,10 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
// items and each PartiQL statement, by its own) is checked as each on what the table gives it, with that
// part's condition keys, not as the operation's own; one naming nothing of any is checked as its own on *,
// with each action the table checks on the same resources as its own (RequestResources#checkedWith).
// The operation's own action, where it is one of those, is checked as it would be alone, with the request's
// tags and carried values, and its resources are the ones the checks after it (the tagging action a create
// also needs, a companion, a forwarded action) are made on.
List<String> checkedOn = resources;
if (RequestResources.checkedByParts(resolvedOperation.operation())) {
List<RequestResources.Target> targets = arnBuilder.targets(credentialScope, resolvedOperation.operation(),
ctx, region, accountId, requestPartition());
@@ -621,17 +626,29 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
targets = RequestResources.checkedWith(resolvedOperation.operation(), action).stream()
.map(checked -> new RequestResources.Target(checked, List.of("*"), null)).toList();
}
Set<String> ownResources = new LinkedHashSet<>();
for (RequestResources.Target target : targets) {
Map<String, List<String>> resolved = conditionContextResolver.resolvePart(credentialScope,
target.action(), resolvedOperation.operation(), ctx, target.element(), region);
Map<String, List<String>> partContext = resolved == null ? new HashMap<>() : new HashMap<>(resolved);
callerArns.ifPresent(arns -> arns.putPrincipalKeys(partContext));
if (abortIfDenied(ctx, caller, principal, target.action(), action, credentialScope,
resolveResourceArns(credentialScope, target.resources()), List.of(partContext), region,
accountId, akid)) {
List<String> targetResources = resolveResourceArns(credentialScope, target.resources());
List<Map<String, List<String>>> contexts;
if (target.action().equals(action) && target.element() == null) {
contexts = targetContexts;
ownResources.addAll(targetResources);
} else {
Map<String, List<String>> resolved = conditionContextResolver.resolvePart(credentialScope,
target.action(), resolvedOperation.operation(), ctx, target.element(), region);
Map<String, List<String>> partContext = resolved == null ? new HashMap<>()
: new HashMap<>(resolved);
callerArns.ifPresent(arns -> arns.putPrincipalKeys(partContext));
contexts = List.of(partContext);
}
if (abortIfDenied(ctx, caller, principal, target.action(), action, credentialScope, targetResources,
contexts, region, accountId, akid)) {
return;
}
}
if (!ownResources.isEmpty()) {
checkedOn = List.copyOf(ownResources);
}
} else if (abortIfDenied(ctx, caller, principal, action, credentialScope, resources, targetContexts,
region, accountId, akid)) {
return;
@@ -645,11 +662,11 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
return;
}
if (abortIfForwardedDenied(ctx, caller, principal, callerArns.orElse(null), action,
resolvedOperation.operation(), credentialScope, resources, region, accountId, akid)) {
resolvedOperation.operation(), credentialScope, checkedOn, region, accountId, akid)) {
return;
}
if (tagOnCreate.isPresent() && abortIfTagOnCreateDenied(ctx, caller, principal, callerArns.orElse(null),
action, resolvedOperation.operation(), tagOnCreate.get(), credentialScope, resources, region,
action, resolvedOperation.operation(), tagOnCreate.get(), credentialScope, checkedOn, region,
accountId, akid)) {
return;
}
@@ -670,11 +687,11 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
|| (conditionContext != null && companion.carried() != null
&& conditionContext.containsKey(companion.carried()));
if (sets && roleSession && companion.callerPolicyWhenChained()
&& abortIfOwnPolicyDenies(ctx, caller, companion.action(), credentialScope, resources,
&& abortIfOwnPolicyDenies(ctx, caller, companion.action(), credentialScope, checkedOn,
targetContexts, akid)) {
return;
}
if (sets && abortIfDenied(ctx, caller, principal, companion.action(), action, credentialScope, resources,
if (sets && abortIfDenied(ctx, caller, principal, companion.action(), action, credentialScope, checkedOn,
targetContexts, region, accountId, akid)) {
return;
}
@@ -686,7 +703,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
// with or without the trailing :* as it does the create's.
if ("logs:CreateLogGroup".equals(action) && conditionContext != null
&& !conditionContext.getOrDefault("aws:TagKeys", List.of()).isEmpty()) {
String taggingResource = resources.getFirst();
String taggingResource = checkedOn.getFirst();
Map<String, List<String>> taggingContext = IamConditionContextResolver.withGlobalContext(
conditionContext, taggingResource, region, accountId, accountId);
if (evaluator.evaluate(caller, null, "logs:TagResource", taggingResource, taggingContext) == Decision.DENY
@@ -705,7 +722,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
if ("logs:PutAccountPolicy".equals(action) || "logs:DescribeAccountPolicies".equals(action)) {
String typeAction = accountPolicyTypeAction(action, arnBuilder.readJsonBody(ctx));
if (typeAction != null && abortIfDenied(ctx, caller, principal, typeAction, action, credentialScope,
resources, targetContexts, region, accountId, akid)) {
checkedOn, targetContexts, region, accountId, akid)) {
return;
}
}
@@ -719,7 +736,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
// CompleteMultipartUpload as the operations that take If-Match; CreateMultipartUpload and
// UploadPart, also checked as s3:PutObject, ignore it, so it adds nothing to them.
if ("s3:PutObject".equals(action) && evaluatesIfMatch(ctx) && ctx.getHeaderString("If-Match") != null
&& abortIfDenied(ctx, caller, principal, "s3:GetObject", action, credentialScope, resources,
&& abortIfDenied(ctx, caller, principal, "s3:GetObject", action, credentialScope, checkedOn,
withoutObjectTags(targetContexts), region, accountId, akid)) {
return;
}
@@ -732,7 +749,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
if (("s3:DeleteObject".equals(action) || "s3:DeleteObjectVersion".equals(action))
&& isPlainDeleteObject(ctx)
&& isETagCondition(ctx.getHeaderString("If-Match"))
&& abortIfDenied(ctx, caller, principal, "s3:GetObject", action, credentialScope, resources,
&& abortIfDenied(ctx, caller, principal, "s3:GetObject", action, credentialScope, checkedOn,
withoutObjectTags(targetContexts), region, accountId, akid)) {
return;
}
@@ -747,7 +764,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
&& "true".equalsIgnoreCase(ctx.getHeaderString("x-amz-bypass-governance-retention"))) {
boolean overrides = conditionContextResolver.s3OverridesGovernanceRetention(action, ctx);
if (overrides && abortIfDenied(ctx, caller, principal, "s3:BypassGovernanceRetention", action,
credentialScope, resources, targetContexts, region, accountId, akid)) {
credentialScope, checkedOn, targetContexts, region, accountId, akid)) {
return;
}
requestContext.setIamGovernanceBypass(overrides);
@@ -760,7 +777,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
for (String creationAction
: S3ObjectActions.objectCreationActions(ctx::getHeaderString, requestTagging(ctx),
S3ObjectActions.isCopy(ctx.getMethod(), ctx::getHeaderString))) {
if (abortIfDenied(ctx, caller, principal, creationAction, action, credentialScope, resources,
if (abortIfDenied(ctx, caller, principal, creationAction, action, credentialScope, checkedOn,
targetContexts, region, accountId, akid)) {
return;
}
@@ -775,7 +792,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
&& ctx.getUriInfo().getQueryParameters().containsKey("attributes")) {
String attributesAction = S3ObjectActions.forVersion("s3:GetObjectAttributes",
ctx.getUriInfo().getQueryParameters().getFirst("versionId"));
abortIfDenied(ctx, caller, principal, attributesAction, attributesAction, credentialScope, resources,
abortIfDenied(ctx, caller, principal, attributesAction, attributesAction, credentialScope, checkedOn,
targetContexts, region, accountId, akid);
}
}
@@ -478,9 +478,9 @@ public class LambdaLayerService {
* than the caller's, so Floci cannot decide whether it exists. On the live service such a
* layer resolves through its resource policy, measured against ap-southeast-1: an ARN in
* another account whose name and version match a layer of the caller's own is
* {@code AccessDeniedException}, never a substitution. Floci has no layer permission model
* (see the Not Implemented list), so it treats every foreign ARN as unknowable rather than
* resolving it inside the caller's own partition.
* {@code AccessDeniedException}, never a substitution. Floci does not yet resolve another
* account's layer its owner granted with AddLayerVersionPermission, so it treats every foreign
* ARN as unknowable rather than resolving it inside the caller's own partition.
*/
public boolean isForeignLayerArn(String layerVersionArn) {
AwsArnUtils.Arn arn = parseLayerVersionArn(layerVersionArn);
@@ -500,6 +500,20 @@ public class LambdaLayerService {
return AwsArnUtils.isForeignPartition(parseLayerVersionArn(layerVersionArn), regionResolver.getPartition());
}
/**
* Whether a layer version ARN names a layer of another account than {@code accountId}, which Lambda reads in that
* account alone, through its owner's resource-based policy, and never as the caller's layer of that name ("an ARN
* in another account whose name and version match a layer of the caller's own is AccessDeniedException, never a
* substitution"), so IAM checks it on that ARN alone.
*/
public boolean actsInItsAccount(String layerVersionArn, String accountId) {
if (layerVersionArn == null || !LAYER_VERSION_ARN.matcher(layerVersionArn).matches()) {
return false;
}
AwsArnUtils.Arn arn = AwsArnUtils.parse(layerVersionArn);
return !arn.accountId().isEmpty() && !arn.accountId().equals(accountId);
}
private AwsArnUtils.Arn parseLayerVersionArn(String layerVersionArn) {
AwsArnUtils.Arn arn;
try {
@@ -389,9 +389,10 @@ public class LambdaService implements ResourceProvider, VpcDependencyProvider {
// and a cross-partition ARN return the same AccessDeniedException, so Floci returns that for
// both rather than inventing a distinction the API does not make.
//
// Floci implements no layer permissions, so it cannot tell a public layer from a private one
// and cannot fetch either one's content. Refusing is the faithful default: it is the answer
// AWS gives to every foreign ARN except a public layer. floci.services.lambda
// Floci cannot fetch real AWS content, so it cannot tell a public layer from a private one,
// and it does not yet resolve another account's layer its owner granted with
// AddLayerVersionPermission. Refusing is the faithful default: it is the answer AWS gives to
// every foreign ARN except a public or granted layer. floci.services.lambda
// .accept-external-layer-arns records a same-partition foreign ARN unresolved instead, which
// is what a stack attaching Powertools or the AppConfig extension needs. Cross-partition
// stays refused even then, because partitions are isolated and no policy can reach across
@@ -14,7 +14,8 @@ import java.util.Map;
import java.util.Optional;
/**
* What IAM asks Lambda of the resources a request names: the stored layer version a layer version ARN selects, the
* What IAM asks Lambda of the resources a request names: the stored layer version a layer version ARN selects, that
* another account's layer version is read in that account alone, the
* image the caller's MicroVM runs, which the Service Reference checks an action on a running MicroVM on, the
* durable execution a callback belongs to, which Lambda authorizes a callback request against, and the tags of a
* function, an event source mapping, a web function, a MicroVM image or a network connector.
@@ -53,6 +54,12 @@ public class LambdaStoredResourceArns implements StoredResourceArns {
return layers.storedLayerVersionArn(arn);
}
/** A layer version of another account, which Lambda reads in that account through its owner's policy. */
@Override
public boolean reachedInItsAccount(String arn, String accountId) {
return layers != null && layers.actsInItsAccount(arn, accountId);
}
/**
* The image of the caller's MicroVM a {@code microvmIdentifier} names, and the durable execution of the callback a
* {@code CallbackId} names; empty when the caller has no such MicroVM, or the id names no callback.
@@ -2,10 +2,10 @@
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.44.13 (local/aws/botocore)", "retrieved": "2026-11-29", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "apigateway": ["apigateway", "apigatewayv2"], "appconfig": ["appconfig", "appconfigdata"], "application-autoscaling": ["application-autoscaling"], "appsync": ["appsync"], "aps": ["amp"], "athena": ["athena"], "backup": ["backup"], "batch": ["batch"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codeartifact": ["codeartifact"], "codebuild": ["codebuild"], "codeguru-reviewer": ["codeguru-reviewer"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticfilesystem": ["efs"], "elasticloadbalancing": ["elb", "elb-proxy", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam", "iam-toolbox"], "identitystore": ["identitystore"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "rds-data": ["rds-data"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "route53resolver": ["route53resolver"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "sagemaker": ["sagemaker", "sagemaker-a2i-runtime", "sagemaker-edge", "sagemaker-featurestore-runtime", "sagemaker-gateway-runtime", "sagemaker-inference-router-runtime", "sagemaker-metrics", "sagemaker-runtime", "sagemakerjobruntime", "sagemakertrainingsessionruntime"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "xray": ["xray"]},
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/<name>_<id>, an id the service mints after the name; reading it needs that format corrected", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rum": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a portfolio or product imported from another account keeps its owner's account in its ARN while requests name it by its id alone; and AppRegistry's applications and attribute groups are named in the path", "signin": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "ssmmessages": "channel routes authorise agent and client resources directly rather than through generated request mappings", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "swf": "not read yet: the Service Reference gives a domain's ARN no Region, `swf:Line truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifygen3", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finops-agent", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifygen3", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-external", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finops-agent", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line truncated
"pathFormats": {"apigateway": {"/restapis/{restapi_id}/models/{model_name}/default_template (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/models/${ModelName}/default_template", "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/authorizers", "/restapis/{restapi_id}/stages/{stage_name}/cache/data (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/data", "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/exports/${ExportType}", "/sdktypes (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes", "/sdktypes/{sdktype_id} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes/${SdktypeId}", "/usageplans/{usageplanId}/keys/{keyId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/keys/${KeyId}/usage", "/usageplans/{usageplanId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/usage", "Authorizer (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers/${Id}", "Authorizers (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers", "Deployment (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments/${Id}", "Deployments (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments", "Integration (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration", "IntegrationResponse (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration/responses/${StatusCode}", "Model (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models/${ModelName}", "Models (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models", "Stage (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages/${StageName}", "Stages (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages"}},
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "appconfig": {"application": ["aws:ResourceTag/"], "configuration": ["aws:ResourceTag/"], "configurationprofile": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "deploymentstrategy": ["aws:ResourceTag/"], "environment": ["aws:ResourceTag/"], "experimentdefinition": ["aws:ResourceTag/"], "experimentrun": ["aws:ResourceTag/"], "extension": ["aws:ResourceTag/"], "extensionassociation": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "appsync": {"api": ["aws:ResourceTag/"], "channelNamespace": ["aws:ResourceTag/"], "domain": ["aws:ResourceTag/"], "graphqlapi": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "backup": {"backupAccessPoint": ["aws:ResourceTag/"], "backupPlan": ["aws:ResourceTag/"], "backupVault": ["aws:ResourceTag/"], "framework": ["aws:ResourceTag/"], "legalHold": ["aws:ResourceTag/"], "recoveryPoint": ["aws:ResourceTag/"], "reportPlan": ["aws:ResourceTag/"], "restoreTestingPlan": ["aws:ResourceTag/"], "tieringConfiguration": ["aws:ResourceTag/"]}, "batch": {"compute-environment": ["aws:ResourceTag/"], "consumable-resource": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "job-definition-revision": ["aws:ResourceTag/"], "job-queue": ["aws:ResourceTag/"], "quota-share": ["aws:ResourceTag/"], "scheduling-policy": ["aws:ResourceTag/"], "service-environment": ["aws:ResourceTag/"], "service-job": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResouLine truncated
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "appconfig": {"application": ["aws:ResourceTag/"], "configuration": ["aws:ResourceTag/"], "configurationprofile": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "deploymentstrategy": ["aws:ResourceTag/"], "environment": ["aws:ResourceTag/"], "experimentdefinition": ["aws:ResourceTag/"], "experimentrun": ["aws:ResourceTag/"], "extension": ["aws:ResourceTag/"], "extensionassociation": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "appsync": {"api": ["aws:ResourceTag/"], "channelNamespace": ["aws:ResourceTag/"], "domain": ["aws:ResourceTag/"], "graphqlapi": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "backup": {"backupAccessPoint": ["aws:ResourceTag/"], "backupPlan": ["aws:ResourceTag/"], "backupVault": ["aws:ResourceTag/"], "framework": ["aws:ResourceTag/"], "legalHold": ["aws:ResourceTag/"], "recoveryPoint": ["aws:ResourceTag/"], "reportPlan": ["aws:ResourceTag/"], "restoreTestingPlan": ["aws:ResourceTag/"], "tieringConfiguration": ["aws:ResourceTag/"]}, "batch": {"compute-environment": ["aws:ResourceTag/"], "consumable-resource": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "job-definition-revision": ["aws:ResourceTag/"], "job-queue": ["aws:ResourceTag/"], "quota-share": ["aws:ResourceTag/"], "scheduling-policy": ["aws:ResourceTag/"], "service-environment": ["aws:ResourceTag/"], "service-job": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResouLine truncated
"resourceKeys": {"ec2": {"capacity-reservation": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:CapacityReservationFleet": {"member": "CapacityReservationFleetId", "arn": "capacity-reservation-fleet"}, "ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:EndDateType": {"member": "EndDateType"}, "ec2:EphemeralStorage": {"member": "EphemeralStorage"}, "ec2:InstanceMatchCriteria": {"member": "InstanceMatchCriteria"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:Tenancy": {"member": "Tenancy"}}, "carrier-gateway": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "dhcp-options": {"ec2:DhcpOptionsID": {"member": "DhcpOptionsId"}}, "fpga-image": {"ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}}, "image": {"ec2:ImageID": {"member": "ImageId"}, "ec2:ImageType": {"member": "ImageType"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "instance": {"ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:InstanceID": {"member": "InstanceId"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "internet-gateway": {"ec2:InternetGatewayID": {"member": "InternetGatewayId"}}, "launch-template": {"ec2:LaunchTemplate": {"member": "LaunchTemplateId", "arn": "launch-template"}}, "network-acl": {"ec2:NetworkAclID": {"member": "NetworkAclId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "network-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:NetworkInterfaceID": {"member": "NetworkInterfaceId"}, "ec2:Subnet": {"member": "SubnetId", "arn": "subnet"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "reserved-instances": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:InstanceType": {"member": "InstanceType"}}, "route-table": {"ec2:RouteTableID": {"member": "RouteTableId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "secondary-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}}, "security-group": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "snapshot": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:SnapshotID": {"member": "SnapshotId"}, "ec2:VolumeSize": {"member": "VolumeSize"}}, "subnet": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:SubnetID": {"member": "SubnetId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "transit-gateway": {"ec2:transitGatewayId": {"member": "TransitGatewayId"}}, "transit-gateway-attachment": {"ec2:transitGatewayAttachmentId": {"member": "TransitGatewayAttachmentId"}}, "transit-gateway-connect-peer": {"ec2:transitGatewayConnectPeerId": {"member": "TransitGatewayConnectPeerId"}}, "transit-gateway-metering-policy": {"ec2:transitGatewayMeteringPolicyId": {"member": "TransitGatewayMeteringPolicyId"}}, "transit-gateway-multicast-domain": {"ec2:transitGatewayMulticastDomainId": {"member": "TransitGatewayMulticastDomainId"}}, "transit-gateway-policy-table": {"ec2:transitGatewayPolicyTableId": {"member": "TransitGatewayPolicyTableId"}}, "transit-gateway-route-table": {"ec2:transitGatewayRouteTableId": {"member": "TransitGatewayRouteTableId"}}, "transit-gateway-route-table-announcement": {"ec2:transitGatewayRouteTableAnnouncementId": {"member": "TransitGatewayRouteTableAnnouncementId"}}, "volume": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:KmsKeyId": {"member": "KmsKeyId"}, "ec2:VolumeID": {"member": "VolumeId"}, "ec2:VolumeInitializationRate": {"member": "VolumeInitializationRate"}, "ec2:VolumeType": {"member": "VolumeType"}}, "vpc": {"ec2:VpcID": {"member": "VpcId"}}, "vpc-peering-connection": {"ec2:VpcPeeringConnectionID": {"member": "VpcPeeringConnectionId"}}}},
"unqualified": {"ssm": ["parameter"], "states": ["statemachine"]},
"mintedIds": {"events": ["api-destination", "connection"]},
@@ -4930,7 +4930,7 @@
"lambda:CreateCapacityProvider": {"action": "lambda:CreateCapacityProvider", "types": ["capacityProvider"], "resources": [{"types": ["capacityProvider"], "arn": "KmsKeyArn", "apis": ["rest-json/2015-03-31"]}, {"type": "capacityProvider", "fill": {"CapacityProviderName": "CapacityProviderName"}, "arnOf": {"CapacityProviderName": "capacityProvider"}, "apis": ["rest-json/2015-03-31"]}]},
"lambda:CreateCodeSigningConfig": {"action": "lambda:CreateCodeSigningConfig", "types": [], "resources": [], "makes": [{"type": "code signing config", "fill": {}}]},
"lambda:CreateEventSourceMapping": {"action": "lambda:CreateEventSourceMapping", "types": [], "resources": []},
"lambda:CreateFunction": {"action": "lambda:CreateFunction", "types": ["function"], "resources": [{"types": ["function"], "arn": "Code.SourceKMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "CodeSigningConfigArn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "DeadLetterConfig.TargetArn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "DurableConfig.KMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "FileSystemConfigs[].Arn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "KMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "apis": ["rest-json/2015-03-31"]}]},
"lambda:CreateFunction": {"action": "lambda:CreateFunction", "types": ["function"], "actions": {"lambda:CreateFunction": ["function"], "lambda:GetLayerVersion": ["layerVersion"]}, "resources": [{"types": ["function"], "arn": "Code.SourceKMSKeyArn", "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "CodeSigningConfigArn", "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "DeadLetterConfig.TargetArn", "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "DurableConfig.KMSKeyArn", "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "FileSystemConfigs[].Arn", "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "KMSKeyArn", "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "action": "lambda:CreateFunction", "apis": ["rest-json/2015-03-31"]}, {"types": ["layerVersion"], "arn": "Layers[]", "action": "lambda:GetLayerVersion", "apis": ["rest-json/2015-03-31"]}]},
"lambda:CreateFunctionUrlConfig": {"action": "lambda:CreateFunctionUrlConfig", "types": ["function"], "resources": [{"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "apis": ["rest-json/2015-03-31"]}], "located": {"FunctionName": "{FunctionName}"}},
"lambda:CreateMicrovmAuthToken": {"action": "lambda:CreateMicrovmAuthToken", "types": ["microvmImage"], "resources": [{"types": ["microvmImage"], "through": "microvmIdentifier", "apis": ["rest-json/2025-09-09"]}], "located": {"microvmIdentifier": "{microvmIdentifier}"}},
"lambda:CreateMicrovmImage": {"action": "lambda:CreateMicrovmImage", "types": [], "resources": [], "makes": [{"type": "microvmImage", "fill": {"MicrovmImageName": "name"}}]},
@@ -5064,7 +5064,7 @@
"lambda:UpdateCodeSigningConfig": {"action": "lambda:UpdateCodeSigningConfig", "types": ["code signing config"], "resources": [{"types": ["code signing config"], "arn": "AllowedPublishers.SigningProfileVersionArns[]", "apis": ["rest-json/2015-03-31"]}, {"types": ["code signing config"], "arn": "CodeSigningConfigArn", "apis": ["rest-json/2015-03-31"]}], "located": {"CodeSigningConfigArn": "{CodeSigningConfigArn}"}},
"lambda:UpdateEventSourceMapping": {"action": "lambda:UpdateEventSourceMapping", "types": ["eventSourceMapping"], "resources": [{"types": ["eventSourceMapping"], "arn": "KMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"type": "eventSourceMapping", "fill": {"UUID": "UUID"}, "apis": ["rest-json/2015-03-31"]}], "located": {"UUID": "{UUID}"}},
"lambda:UpdateFunctionCode": {"action": "lambda:UpdateFunctionCode", "types": ["function"], "resources": [{"types": ["function"], "arn": "SourceKMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "apis": ["rest-json/2015-03-31"]}], "located": {"FunctionName": "{FunctionName}"}},
"lambda:UpdateFunctionConfiguration": {"action": "lambda:UpdateFunctionConfiguration", "types": ["function"], "resources": [{"types": ["function"], "arn": "DeadLetterConfig.TargetArn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "DurableConfig.KMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "FileSystemConfigs[].Arn", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "KMSKeyArn", "apis": ["rest-json/2015-03-31"]}, {"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "apis": ["rest-json/2015-03-31"]}], "located": {"FunctionName": "{FunctionName}"}},
"lambda:UpdateFunctionConfiguration": {"action": "lambda:UpdateFunctionConfiguration", "types": ["function"], "actions": {"lambda:UpdateFunctionConfiguration": ["function"], "lambda:GetLayerVersion": ["layerVersion"]}, "resources": [{"types": ["function"], "arn": "DeadLetterConfig.TargetArn", "action": "lambda:UpdateFunctionConfiguration", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "DurableConfig.KMSKeyArn", "action": "lambda:UpdateFunctionConfiguration", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "FileSystemConfigs[].Arn", "action": "lambda:UpdateFunctionConfiguration", "apis": ["rest-json/2015-03-31"]}, {"types": ["function"], "arn": "KMSKeyArn", "action": "lambda:UpdateFunctionConfiguration", "apis": ["rest-json/2015-03-31"]}, {"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "action": "lambda:UpdateFunctionConfiguration", "apis": ["rest-json/2015-03-31"]}, {"types": ["layerVersion"], "arn": "Layers[]", "action": "lambda:GetLayerVersion", "apis": ["rest-json/2015-03-31"]}], "located": {"FunctionName": "{FunctionName}"}},
"lambda:UpdateFunctionEventInvokeConfig": {"action": "lambda:UpdateFunctionEventInvokeConfig", "types": ["function"], "resources": [{"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "apis": ["rest-json/2015-03-31"]}], "located": {"FunctionName": "{FunctionName}"}},
"lambda:UpdateFunctionUrlConfig": {"action": "lambda:UpdateFunctionUrlConfig", "types": ["function"], "resources": [{"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true, "apis": ["rest-json/2015-03-31"]}], "located": {"FunctionName": "{FunctionName}"}},
"lambda:UpdateMicrovmImage": {"action": "lambda:UpdateMicrovmImage", "types": ["microvmImage"], "resources": [{"types": ["microvmImage"], "arn": "baseImageArn", "apis": ["rest-json/2025-09-09"]}, {"type": "microvmImage", "fill": {"MicrovmImageName": "imageIdentifier"}, "apis": ["rest-json/2025-09-09"]}], "located": {"imageIdentifier": "{imageIdentifier}"}},
@@ -6713,7 +6713,7 @@
"s3vectors:UpdateMetadataConfiguration": {"action": "s3vectors:UpdateMetadataConfiguration", "types": ["Index"], "resources": [{"types": ["Index"], "arn": "indexArn", "apis": ["rest-json/2025-07-15"]}, {"type": "Index", "fill": {"BucketName": "vectorBucketName", "IndexName": "indexName"}, "apis": ["rest-json/2025-07-15"]}]},
"sagemaker:AddAssociation": {"action": "sagemaker:AddAssociation", "types": ["action", "artifact", "context", "experiment", "experiment-trial-component"], "resources": [{"types": ["action", "artifact", "context", "experiment", "experiment-trial-component"], "arn": "DestinationArn", "apis": ["json/2017-07-24"]}, {"types": ["action", "artifact", "context", "experiment", "experiment-trial-component"], "arn": "SourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:AddInferenceGateway": {"action": "sagemaker:AddInferenceGateway", "types": ["global-inference-gateway"], "resources": [{"types": ["global-inference-gateway"], "arn": "ClusterArn", "apis": ["json/2017-07-24"]}, {"type": "global-inference-gateway", "fill": {"GlobalInferenceGatewayId": "Identifier"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:AddTags": {"action": "sagemaker:AddTags", "types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "resources": [{"types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "arn": "ResourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:AddTags": {"action": "sagemaker:AddTags", "types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "leaderboard", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-monitor-config", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "resources": [{"types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "leaderboard", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-monitor-config", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "arn": "ResourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:AssociateTrialComponent": {"action": "sagemaker:AssociateTrialComponent", "types": ["experiment-trial", "experiment-trial-component"], "resources": [{"type": "experiment-trial", "fill": {"TrialName": "TrialName"}, "apis": ["json/2017-07-24"]}, {"type": "experiment-trial-component", "fill": {"TrialComponentName": "TrialComponentName"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:AttachClusterNodeNetworkInterface": {"action": "sagemaker:AttachClusterNodeNetworkInterface", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {}, "find": ["ClusterName"], "apis": ["json/2017-07-24"]}]},
"sagemaker:AttachClusterNodeVolume": {"action": "sagemaker:AttachClusterNodeVolume", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "ClusterArn", "apis": ["json/2017-07-24"]}]},
@@ -6864,7 +6864,7 @@
"sagemaker:DeleteRecord": {"action": "sagemaker:DeleteRecord", "types": ["feature-group"], "resources": [{"type": "feature-group", "fill": {"FeatureGroupName": "FeatureGroupName"}, "arnOf": {"FeatureGroupName": "feature-group"}, "apis": ["rest-json/2020-07-01"]}], "located": {"FeatureGroupName": "{FeatureGroupName}"}},
"sagemaker:DeleteSpace": {"action": "sagemaker:DeleteSpace", "types": ["space"], "resources": [{"type": "space", "fill": {"DomainId": "DomainId", "SpaceName": "SpaceName"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:DeleteStudioLifecycleConfig": {"action": "sagemaker:DeleteStudioLifecycleConfig", "types": ["studio-lifecycle-config"], "resources": [{"type": "studio-lifecycle-config", "fill": {"StudioLifecycleConfigName": "StudioLifecycleConfigName"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:DeleteTags": {"action": "sagemaker:DeleteTags", "types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "resources": [{"types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "arn": "ResourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:DeleteTags": {"action": "sagemaker:DeleteTags", "types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "leaderboard", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-monitor-config", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "resources": [{"types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "leaderboard", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-monitor-config", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "arn": "ResourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:DeleteTrainingJob": {"action": "sagemaker:DeleteTrainingJob", "types": ["training-job"], "resources": [{"type": "training-job", "fill": {"TrainingJobName": "TrainingJobName"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:DeleteTrainingSession": {"action": "sagemaker:DeleteTrainingSession", "types": ["training-session"], "resources": [{"type": "training-session", "fill": {"SessionName": "TrainingSessionName"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:DeleteTrial": {"action": "sagemaker:DeleteTrial", "types": ["experiment-trial"], "resources": [{"type": "experiment-trial", "fill": {"TrialName": "TrialName"}, "apis": ["json/2017-07-24"]}]},
@@ -7073,7 +7073,7 @@
"sagemaker:ListStageDevices": {"action": "sagemaker:ListStageDevices", "types": [], "resources": []},
"sagemaker:ListStudioLifecycleConfigs": {"action": "sagemaker:ListStudioLifecycleConfigs", "types": [], "resources": []},
"sagemaker:ListSubscribedWorkteams": {"action": "sagemaker:ListSubscribedWorkteams", "types": [], "resources": []},
"sagemaker:ListTags": {"action": "sagemaker:ListTags", "types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "pipeline-execution", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "resources": [{"types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "pipeline-execution", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "arn": "ResourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:ListTags": {"action": "sagemaker:ListTags", "types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "leaderboard", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-monitor-config", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "pipeline-execution", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "resources": [{"types": ["action", "ai-benchmark-job", "ai-recommendation-job", "ai-workload-config", "algorithm", "app", "app-image-config", "artifact", "automl-job", "cluster", "cluster-scheduler-config", "code-repository", "compilation-job", "compute-quota", "context", "data-quality-job-definition", "device", "device-fleet", "domain", "edge-deployment-plan", "edge-packaging-job", "endpoint", "endpoint-config", "experiment", "experiment-trial", "experiment-trial-component", "extension", "feature-group", "flow-definition", "global-inference-gateway", "hub", "hub-content", "human-task-ui", "hyper-parameter-tuning-job", "image", "inference-component", "inference-recommendations-job", "inference-router", "job", "labeling-job", "leaderboard", "mlflow-app", "mlflow-tracking-server", "model", "model-bias-job-definition", "model-card", "model-explainability-job-definition", "model-monitor-config", "model-package", "model-package-group", "model-quality-job-definition", "monitoring-schedule", "notebook-instance", "notebook-instance-lifecycle-config", "optimization-job", "partner-app", "pipeline", "pipeline-execution", "processing-job", "project", "reserved-capacity", "sm-capacity-reservation", "space", "studio-lifecycle-config", "training-job", "training-plan", "transform-job", "user-profile", "workteam"], "arn": "ResourceArn", "apis": ["json/2017-07-24"]}]},
"sagemaker:ListTrainingJobs": {"action": "sagemaker:ListTrainingJobs", "types": [], "resources": []},
"sagemaker:ListTrainingJobsForHyperParameterTuningJob": {"action": "sagemaker:ListTrainingJobsForHyperParameterTuningJob", "types": ["hyper-parameter-tuning-job"], "resources": [{"type": "hyper-parameter-tuning-job", "fill": {"HyperParameterTuningJobName": "HyperParameterTuningJobName"}, "apis": ["json/2017-07-24"]}]},
"sagemaker:ListTrainingPlans": {"action": "sagemaker:ListTrainingPlans", "types": [], "resources": []},
@@ -31,6 +31,7 @@ import io.floci.aws.services.iam.model.InstanceProfile;
import io.floci.aws.services.iam.model.ServerCertificate;
import io.floci.aws.services.kms.KmsService;
import io.floci.aws.services.kms.KmsStoredResourceArns;
import io.floci.aws.services.lambda.LambdaLayerFixtures;
import io.floci.aws.services.lambda.LambdaStoredResourceArns;
import io.floci.aws.services.lambdamicrovms.LambdaMicrovmsService;
import io.floci.aws.services.s3.S3RequestPathLabels;
@@ -2370,16 +2371,47 @@ class ResourceArnBuilderTest {
"GetProvisionedConcurrencyConfig")));
}
/** CreateFunction is checked on the function its body names. */
/**
* CreateFunction is checked on the function its body names, and as {@code lambda:GetLayerVersion} on each layer
* version its Layers give ("Make sure that you have permission to call the GetLayerVersion API on the layer
* version"); a request giving no layers is not checked as that action.
*/
@Test
void createFunctionIsCheckedOnTheFunctionItsBodyNames() {
void createFunctionIsCheckedOnTheFunctionItsBodyNamesAndAsGetLayerVersionOnEachLayer() {
setJsonBody("{\"FunctionName\":\"my-function\",\"Runtime\":\"nodejs20.x\"}");
assertEquals(List.of(FUNCTION), lambda("POST", "/2015-03-31/functions", "CreateFunction"));
assertEquals(List.of(new RequestResources.Target("lambda:CreateFunction", List.of(FUNCTION), null)),
lambdaTargets("CreateFunction"));
setJsonBody("{\"FunctionName\":\"" + OTHER_FUNCTION + "\"}");
assertEquals(Set.of(OTHER_FUNCTION, FUNCTION), Set.copyOf(lambda("POST", "/2015-03-31/functions",
"CreateFunction")));
List<RequestResources.Target> other = lambdaTargets("CreateFunction");
assertEquals(List.of("lambda:CreateFunction"), other.stream().map(RequestResources.Target::action).toList());
assertEquals(Set.of(OTHER_FUNCTION, FUNCTION), Set.copyOf(other.getFirst().resources()));
// Naming no function, it is checked on every resource as its own action alone, which IAM's filter does with
// what the table checks on the same rows as it: GetLayerVersion's are its own.
setJsonBody("{\"Runtime\":\"nodejs20.x\"}");
assertEquals(List.of("*"), lambda("POST", "/2015-03-31/functions", "CreateFunction"));
assertEquals(List.of(), lambdaTargets("CreateFunction"));
assertEquals(List.of("lambda:CreateFunction"),
RequestResources.checkedWith("lambda:CreateFunction", "lambda:CreateFunction"));
String shared = "arn:aws:lambda:us-east-1:111122223333:layer:shared:3";
String own = "arn:aws:lambda:us-east-1:" + ACCOUNT + ":layer:own:1";
// Another account's layer version is read in that account alone, never as the caller's layer of that name.
ResourceArnBuilder backed = reading(new LambdaStoredResourceArns(
LambdaLayerFixtures.accountScopedService(ACCOUNT, "us-east-1", Map.of()), null, null, null));
setJsonBody("{\"FunctionName\":\"my-function\",\"Layers\":[\"" + own + "\",\"" + shared + "\"]}");
when(ctx.getMethod()).thenReturn("POST");
request("/2015-03-31/functions");
List<RequestResources.Target> layered = backed.targets("lambda", "lambda:CreateFunction", ctx, "us-east-1",
ACCOUNT, "aws");
assertEquals(List.of("lambda:CreateFunction", "lambda:GetLayerVersion"),
layered.stream().map(RequestResources.Target::action).toList());
assertEquals(List.of(List.of(FUNCTION), List.of(own, shared)),
layered.stream().map(RequestResources.Target::resources).toList());
}
private List<RequestResources.Target> lambdaTargets(String operation) {
when(ctx.getMethod()).thenReturn("POST");
request("/2015-03-31/functions");
return builder.targets("lambda", "lambda:" + operation, ctx, "us-east-1", ACCOUNT, "aws");
}
@Test
@@ -0,0 +1,148 @@
package io.floci.aws.services.lambda;
import io.floci.aws.core.common.AwsArnUtils;
import io.floci.aws.testing.AwsTestClients;
import io.floci.aws.testing.EnforcementFixtures;
import io.floci.aws.testing.EnforcementFixtures.UserCredentials;
import io.floci.aws.testing.IamEnforcementProfile;
import io.floci.aws.testing.LambdaCodeFixtures;
import io.floci.aws.testing.PartitionCleanup;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import software.amazon.awssdk.core.SdkBytes;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.lambda.LambdaClient;
import software.amazon.awssdk.services.lambda.model.LambdaException;
import java.net.URI;
import java.util.Map;
import java.util.UUID;
import static io.floci.aws.services.lambda.LambdaLayerFixtures.publishLayerVersion;
import static io.floci.aws.testing.EnforcementFixtures.auth;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* A function's layers are each checked as {@code lambda:GetLayerVersion} on the layer version: "Make sure that you have
* permission to call the GetLayerVersion API on the layer version" (Lambda Developer Guide, adding layers), and the
* Service Reference lists that action among those CreateFunction and UpdateFunctionConfiguration are authorized by. A
* caller allowed both operations but {@code lambda:GetLayerVersion} on one layer version only adds that one, is
* refused the other, and needs nothing more for a function with no layers.
*/
@QuarkusTest
@TestProfile(IamEnforcementProfile.class)
class LambdaFunctionLayersIamIntegrationTest {
private static final String ACCOUNT = "741681410004";
private static final Region REGION = Region.US_EAST_1;
@TestHTTPResource("/")
URI endpoint;
@RegisterExtension
final PartitionCleanup cleanup = new PartitionCleanup();
@Test
void eachLayerOfAFunctionIsCheckedAsGetLayerVersionOnItsVersion() throws Exception {
try (LambdaClient owner = AwsTestClients.create(LambdaClient.builder(), ACCOUNT, REGION, endpoint)) {
String allowed = publishLayerVersion(owner, "allowed-" + suffix(), ACCOUNT, REGION, endpoint, cleanup)
.layerVersionArn();
String refused = publishLayerVersion(owner, "other-" + suffix(), ACCOUNT, REGION, endpoint, cleanup)
.layerVersionArn();
String user = "layers-" + suffix();
String authorization = auth(ACCOUNT, REGION.id(), "iam");
UserCredentials credentials = EnforcementFixtures.createUser(cleanup, endpoint.getPort(), authorization,
user);
EnforcementFixtures.putUserPolicy(endpoint.getPort(), authorization, user, "functions", """
{"Version":"2012-10-17","Statement":[
{"Effect":"Allow","Action":["lambda:CreateFunction","lambda:UpdateFunctionConfiguration",
"iam:PassRole"],"Resource":"*"},
{"Effect":"Allow","Action":"lambda:GetLayerVersion","Resource":"%s"}]}""".formatted(allowed));
try (LambdaClient caller = AwsTestClients.create(LambdaClient.builder(), credentials.accessKeyId(),
credentials.secretAccessKey(), REGION, endpoint)) {
denied(() -> create(owner, caller, "refused-" + suffix(), refused));
String name = create(owner, caller, "layered-" + suffix(), allowed);
String plain = create(owner, caller, "plain-" + suffix(), null);
denied(() -> caller.updateFunctionConfiguration(r -> r.functionName(name)
.layers(refused)));
assertEquals(allowed, caller.updateFunctionConfiguration(r -> r.functionName(plain).layers(allowed))
.layers().getFirst().arn());
// An update leaving the layers out is not checked as GetLayerVersion.
assertEquals(256, caller.updateFunctionConfiguration(r -> r.functionName(name).memorySize(256))
.memorySize());
}
}
}
/**
* Checked as each layer's {@code lambda:GetLayerVersion} too, a create is still checked as its own action with the
* tags it carries ({@code aws:RequestTag}), and its tags as {@code lambda:TagResource} on the function it creates.
*/
@Test
void aLayeredCreateIsCheckedWithItsTagsOnTheFunctionItCreates() throws Exception {
try (LambdaClient owner = AwsTestClients.create(LambdaClient.builder(), ACCOUNT, REGION, endpoint)) {
String layer = publishLayerVersion(owner, "tagged-" + suffix(), ACCOUNT, REGION, endpoint, cleanup)
.layerVersionArn();
String name = "tagged-" + suffix();
String function = "arn:aws:lambda:" + REGION.id() + ":" + ACCOUNT + ":function:" + name;
String user = "tagged-" + suffix();
String authorization = auth(ACCOUNT, REGION.id(), "iam");
UserCredentials credentials = EnforcementFixtures.createUser(cleanup, endpoint.getPort(), authorization,
user);
EnforcementFixtures.putUserPolicy(endpoint.getPort(), authorization, user, "tagged", """
{"Version":"2012-10-17","Statement":[
{"Effect":"Allow","Action":"lambda:CreateFunction","Resource":"*",
"Condition":{"StringEquals":{"aws:RequestTag/team":"dev"}}},
{"Effect":"Allow","Action":"lambda:TagResource","Resource":"%s"},
{"Effect":"Allow","Action":["lambda:GetLayerVersion","iam:PassRole"],"Resource":"*"}]}"""
.formatted(function));
try (LambdaClient caller = AwsTestClients.create(LambdaClient.builder(), credentials.accessKeyId(),
credentials.secretAccessKey(), REGION, endpoint)) {
LambdaException wrongTag = assertThrows(LambdaException.class,
() -> create(owner, caller, name, layer, "prod"));
assertEquals(403, wrongTag.statusCode());
assertTrue(wrongTag.awsErrorDetails().errorMessage().contains("lambda:CreateFunction"),
wrongTag.awsErrorDetails().errorMessage());
assertEquals(name, create(owner, caller, name, layer, "dev"));
}
}
}
private String create(LambdaClient owner, LambdaClient caller, String name, String layer) {
return create(owner, caller, name, layer, null);
}
private String create(LambdaClient owner, LambdaClient caller, String name, String layer, String team) {
String role = AwsArnUtils.Arn.global("aws", "iam", ACCOUNT, "role/layers").toString();
caller.createFunction(r -> {
r.functionName(name).runtime("nodejs22.x").handler("index.handler").role(role)
.code(code -> code.zipFile(SdkBytes.fromByteArray(LambdaCodeFixtures.nodeJsZip(
"exports.handler = async () => 'ok';"))));
if (layer != null) {
r.layers(layer);
}
if (team != null) {
r.tags(Map.of("team", team));
}
});
cleanup.register(() -> owner.deleteFunction(r -> r.functionName(name)));
return name;
}
private static void denied(Runnable call) {
LambdaException e = assertThrows(LambdaException.class, call::run);
assertEquals(403, e.statusCode());
String message = e.awsErrorDetails().errorMessage();
assertTrue(message.contains("is not authorized to perform: lambda:GetLayerVersion"), message);
}
private static String suffix() {
return UUID.randomUUID().toString().substring(0, 8);
}
}
+137
View File
@@ -0,0 +1,137 @@
#!/usr/bin/env python3
"""Vendor what the AWS Lambda Developer Guide says adding a layer to a function needs into
tools/aws/sources/lambda-layer-permissions.json, a source of the IAM tables.
The Service Reference lists lambda:GetLayerVersion among the actions CreateFunction and UpdateFunctionConfiguration
are authorized by, without saying what it is checked on, and botocore does not say it either. The guide's page on
adding layers does, at the head of its section:
Make sure that you have permission to call the GetLayerVersion API on the layer version. For Event Functions in
your AWS account, you must have this permission in your user policy. To use a layer in another account, the owner
of that account must grant your account permission in a resource-based policy.
https://docs.aws.amazon.com/lambda/latest/dg/adding-layers.html
This script copies that paragraph as it stands, with the action each sentence of it naming an API gives and the
resource it gives it on ("the GetLayerVersion API on the layer version": lambda:GetLayerVersion, on the layer
version). A sentence asking for permission to call an API in any other wording is refused, so a reworded page fails
rather than dropping a check. Nothing in the output is written by hand, and the generators read it against the
Service Reference's authorized actions and resource types and botocore's requests.
Run from anywhere in the repo:
python3 tools/aws/fetch_lambda_layer_permissions.py # rewrite the vendored file
python3 tools/aws/fetch_lambda_layer_permissions.py --verify # online: the file still says it
"""
from __future__ import annotations
import argparse
import html
import json
import re
import sys
import urllib.request
from datetime import datetime, timezone
from pathlib import Path
PAGE = "https://docs.aws.amazon.com/lambda/latest/dg/adding-layers.html"
REPO_ROOT = Path(__file__).resolve().parents[2]
OUTPUT = REPO_ROOT / "tools/aws/sources/lambda-layer-permissions.json"
NAMESPACE = "lambda"
# A sentence asking for permission to call an API, and the wording the page gives it in: the API and the resource.
ASKS_RE = re.compile(r"\bpermission to call the\b")
API_RE = re.compile(r"^Make sure that you have permission to call the (?P<api>[A-Z][A-Za-z]+) API on the "
r"(?P<words>[a-z]+(?: [a-z]+)*)\.$")
SENTENCE_RE = re.compile(r"(?<=\.)\s+(?=[A-Z])")
def text(fragment: str) -> str:
"""A fragment of a page as text, spaces collapsed, and none left before a mark an inline tag ends ahead of."""
collapsed = re.sub(r"\s+", " ", html.unescape(re.sub(r"<[^>]+>", " ", fragment))).strip()
return re.sub(r" (?=[.,;:)])", "", re.sub(r"\( ", "(", collapsed))
def body(page: str) -> str:
"""The page's own content, its navigation left out."""
match = re.search(r'<div id="main-col-body">(?P<body>.*?)(?:<div class="prev-next"|$)', page, re.S)
return match.group("body") if match else page
def read_permissions(page: str) -> list[dict]:
"""Each paragraph asking for permission to call an API, as it stands, with the action and the resource each such
sentence of it gives."""
found = []
for paragraph in re.findall(r"<p>(.*?)</p>", body(page), re.S):
said = text(paragraph)
if not ASKS_RE.search(said):
continue
for sentence in SENTENCE_RE.split(said):
if not ASKS_RE.search(sentence):
continue
matched = API_RE.match(sentence)
if matched is None:
raise ValueError(f"{PAGE} says '{sentence}', which asks for permission to call an API in no wording "
f"it used: its wording changed")
found.append({"paragraph": said, "sentence": sentence,
"action": f"{NAMESPACE}:{matched.group('api')}", "on": matched.group("words")})
if not found:
raise ValueError(f"{PAGE} asks for permission to call no API: its layout or wording changed")
return found
def build(page: str) -> dict:
return {
"_source": {
"pages": [PAGE],
"fetcher": str(Path(__file__).resolve().relative_to(REPO_ROOT)),
"retrieved": datetime.now(timezone.utc).strftime("%Y-%m-%d"),
"note": "Each sentence of the adding-layers page asking for permission to call an API, copied as it "
"stands with its paragraph, with the action it names and the resource it names it on.",
},
"apiPermissions": read_permissions(page),
}
def fetch_url(url: str) -> str:
request = urllib.request.Request(url, headers={"User-Agent": "floci-tools"})
with urllib.request.urlopen(request, timeout=60) as response:
return response.read().decode("utf-8")
def fetch_all(fetch=fetch_url) -> tuple[str]:
"""The adding-layers page."""
return (fetch(PAGE),)
def stale(vendored: dict, page: str) -> bool:
"""Whether the page now gives something other than the vendored file, its date aside."""
built = build(page)
return any(vendored.get(key) != built[key] for key in built if key != "_source")
def main(argv: list[str] | None = None, fetch=fetch_url) -> int:
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument("--verify", action="store_true", help="online: the vendored file matches the page")
args = parser.parse_args(argv)
try:
(page,) = fetch_all(fetch)
except OSError as e:
print(f"error: could not read the AWS Lambda Developer Guide ({e})", file=sys.stderr)
return 2
if args.verify:
vendored = json.loads(OUTPUT.read_text(encoding="utf-8"))
if stale(vendored, page):
print(f"error: {OUTPUT.relative_to(REPO_ROOT)} no longer says what the AWS Lambda Developer Guide does: "
f"run tools/aws/fetch_lambda_layer_permissions.py and then make iam-request-resources-sync",
file=sys.stderr)
return 1
print(f"{OUTPUT.relative_to(REPO_ROOT)} matches the AWS Lambda Developer Guide")
return 0
built = build(page)
OUTPUT.write_text(json.dumps(built, indent=2) + "\n", encoding="utf-8")
print(f"wrote {OUTPUT.relative_to(REPO_ROOT)} ({len(built['apiPermissions'])} permissions)")
return 0
if __name__ == "__main__":
sys.exit(main())
+94 -3
View File
@@ -353,6 +353,7 @@ import fetch_dynamodb_permissions
import fetch_ec2_id_examples
import fetch_iam_identifiers
import fetch_kms_api_permissions
import fetch_lambda_layer_permissions
import fetch_required_resource_types
import fetch_secretsmanager_required_permissions
import fetch_sqs_redrive_permissions
@@ -592,9 +593,13 @@ PATH_SOURCES: dict[str, Path] = {
# Secrets Manager's API reference gives each operation's required permissions ("Required permissions:
# secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy");
# tools/aws/fetch_secretsmanager_required_permissions.py vendors the page of each operation the Service Reference lists
# as authorized by another of its actions, and `required_permission_resources` reads what each always needs. Each
# file is written by its own script from the pages, unchanged, and the generator only reads it:
# nothing about an operation is stated here.
# as authorized by another of its actions, and `required_permission_resources` reads what each always needs. AWS
# Lambda's developer guide gives what adding a layer to a function needs ("Make sure that you have permission to call
# the GetLayerVersion API on the layer version"); tools/aws/fetch_lambda_layer_permissions.py vendors the page and
# `api_permission_resources` checks that action, where the Service Reference lists it as authorizing an operation
# (CreateFunction, UpdateFunctionConfiguration), on each value of the request's member holding botocore's ARN shape
# for the type (`LayerVersionArn`, `Layers`). Each file is written by its own script from the pages, unchanged, and
# the generator only reads it: nothing about an operation is stated here.
# ---------------------------------------------------------------------------------------------------------------------
PERMISSION_SOURCES: dict[str, Path] = {
"codeartifact": REPO_ROOT / "tools/aws/sources/codeartifact-permissions.json",
@@ -604,6 +609,7 @@ PERMISSION_SOURCES: dict[str, Path] = {
"ssm": REPO_ROOT / "tools/aws/sources/ssm-session-permissions.json",
"sqs": REPO_ROOT / "tools/aws/sources/sqs-redrive-permissions.json",
"secretsmanager": REPO_ROOT / "tools/aws/sources/secretsmanager-required-permissions.json",
"lambda": REPO_ROOT / "tools/aws/sources/lambda-layer-permissions.json",
}
# The script that writes each namespace's permission source, whose pages `verify_sources` reads it against.
PERMISSION_FETCHERS = {
@@ -614,6 +620,7 @@ PERMISSION_FETCHERS = {
"ssm": fetch_ssm_session_permissions,
"sqs": fetch_sqs_redrive_permissions,
"secretsmanager": fetch_secretsmanager_required_permissions,
"lambda": fetch_lambda_layer_permissions,
}
# Fetched API response examples supplement the identifier prefixes in botocore.
@@ -3212,6 +3219,11 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d
authorized = set(upstream.get("authorized") or known)
resources, actions = required_permission_resources(operation, upstream["action"], resources, source,
known, authorized)
if source is not None and "apiPermissions" in source:
# --check, which reads no Service Reference, takes the actions the file records for the operation.
authorized = set(upstream.get("authorized") or known)
resources, actions = api_permission_resources(operation, upstream["action"], resources, source, known,
authorized, models)
if source is not None and "arnExamples" in source:
resources = with_empty_variables(resources, source["arnExamples"], formats)
if source is not None and "partiql" in source:
@@ -3937,6 +3949,66 @@ def required_permission_resources(operation: str, checked_as: str, resources: li
{action: known[action] for action in order})
def _arn_shape_paths(models: dict[str, dict], operation: str, kind: str) -> list[str]:
"""The top-level members of the operation's request holding botocore's ARN shape for the type (`<Type>Arn`, as
`minted_types` reads it), or a list of it, as `Name` or `Name[]`: CreateFunction's `Layers`, a `LayerList` of
`LayerVersionArn`, as `Layers[]` for a `layerVersion`."""
arn_shape = re.sub(r"[^a-z0-9]", "", kind.lower()) + "arn"
found: list[str] = []
for model in models.values():
spec = model["operations"].get(operation)
if spec is None or "input" not in spec:
continue
for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items():
shape = model["shapes"][member["shape"]]
if member["shape"].lower() == arn_shape and shape["type"] == "string":
path = name
elif shape["type"] == "list" and shape["member"]["shape"].lower() == arn_shape \
and model["shapes"][shape["member"]["shape"]]["type"] == "string":
path = name + "[]"
else:
continue
if path not in found:
found.append(path)
return found
def api_permission_resources(operation: str, checked_as: str, resources: list[dict], source: dict,
known: dict[str, list[str]], authorized: set[str],
models: dict[str, dict]) -> tuple[list[dict], dict | None]:
"""The resources of an operation the Service Reference lists as authorized by an action beside the one it is
checked as (`authorized`) whose namespace's vendored guide asks for permission to call that action's API on a
resource (`apiPermissions`: "Make sure that you have permission to call the GetLayerVersion API on the layer
version"), and those actions, each with the types the Service Reference gives it (`known`): the rules' reading as
the operation's own action, first, then that action on each value of the request's member holding botocore's ARN
shape for the type the words name, as the generator's names go (`stem`, `_arn_shape_paths`). CreateFunction and
UpdateFunctionConfiguration are checked as `lambda:GetLayerVersion` on each layer version their `Layers` give, and
a request giving none is not checked as it. The resources as they are and none for an operation authorized by its
own action alone, by none the guide names, or whose request holds no such member; an operation the rules read
nothing of is still checked as that action on what the member gives."""
if checked_as not in authorized or authorized == {checked_as}:
return resources, None
name = operation.split(":", 1)[1]
extra: list[tuple[str, str, list[str]]] = []
for permission in source["apiPermissions"]:
action = permission["action"]
if action == checked_as or action not in authorized:
continue
kind = next((kind for kind in known.get(action, []) if stem(kind) == stem("".join(permission["on"].split()))),
None)
if kind is None:
raise ValueError(f"{operation}: the vendored permissions check {action} on the {permission['on']}, no "
f"type the Service Reference gives that action")
paths = _arn_shape_paths(models, name, kind)
if paths:
extra.append((action, kind, paths))
if not extra:
return resources, None
rows = [{**resource, "action": checked_as} for resource in resources]
rows += [{"types": [kind], "arn": path, "action": action} for action, kind, paths in extra for path in paths]
return rows, {checked_as: known[checked_as], **{action: known[action] for action, _, _ in extra}}
def verify_group_actions(vendored: dict, documents: list[dict]) -> list[str]:
"""An operation checked as the actions a namespace's vendored groups place whose actions the Service Reference no
longer lists as the ones it is authorized by."""
@@ -3951,6 +4023,24 @@ def verify_group_actions(vendored: dict, documents: list[dict]) -> list[str]:
return untrue
def verify_api_actions(vendored: dict, documents: list[dict]) -> list[str]:
"""An operation checked as an action its namespace's vendored guide asks permission to call the API of
(`apiPermissions`) that the Service Reference no longer lists among the actions it is authorized by."""
authorized = authorized_by(documents)
untrue = []
for operation, entry in sorted(vendored["operations"].items()):
source = load_permission_source(namespace_of(operation)) if "actions" in entry else None
if source is None or "apiPermissions" not in source:
continue
asked = {permission["action"] for permission in source["apiPermissions"]}
dropped = sorted(action for action in entry["actions"]
if action in asked and action not in authorized.get(operation, set()))
if dropped:
untrue.append(f"AWS no longer lists {', '.join(dropped)} among the actions {operation} is authorized by, "
f"as the file checks it")
return untrue
def with_empty_variables(resources: list[dict], examples: list[dict], formats: dict[str, str]) -> list[dict]:
"""The resources, each filling a variable from an optional member, named only when the request gives it
(`unless`), followed, where the vendored pages give an example ARN of its type with that variable empty, by the
@@ -6107,6 +6197,7 @@ def main(argv: list[str] | None = None) -> int:
untrue += verify_forwarded(document, documents)
untrue += verify_permission_actions(document, documents)
untrue += verify_group_actions(document, documents)
untrue += verify_api_actions(document, documents)
try:
untrue += verify_statements(document, documents)
untrue += verify_path_sources()
@@ -0,0 +1,18 @@
{
"_source": {
"pages": [
"https://docs.aws.amazon.com/lambda/latest/dg/adding-layers.html"
],
"fetcher": "tools/aws/fetch_lambda_layer_permissions.py",
"retrieved": "2026-11-29",
"note": "Each sentence of the adding-layers page asking for permission to call an API, copied as it stands with its paragraph, with the action it names and the resource it names it on."
},
"apiPermissions": [
{
"paragraph": "Make sure that you have permission to call the GetLayerVersion API on the layer version. For Event Functions in your AWS account, you must have this permission in your user policy. To use a layer in another account, the owner of that account must grant your account permission in a resource-based policy. For examples, see Granting Lambda layer access to other accounts.",
"sentence": "Make sure that you have permission to call the GetLayerVersion API on the layer version.",
"action": "lambda:GetLayerVersion",
"on": "layer version"
}
]
}
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
"""Tests for fetch_lambda_layer_permissions.py, on pages in the AWS Lambda Developer Guide's markup."""
from __future__ import annotations
import pytest
import fetch_lambda_layer_permissions as f
ASKS = ("<p>Make sure that you have permission to call the <code>GetLayerVersion</code> API on the\n"
" layer version. For Event Functions in your AWS account, you must have this permission in\n"
" your <a href=\"#\">user policy</a>. To use a layer in another account, the owner of that account must "
"grant your account permission in a resource-based policy.</p>")
def page(*paragraphs: str) -> str:
return (f'<div id="main-col-body"><h1>Adding layers</h1><p>You can add layers.</p>{"".join(paragraphs)}'
f'<h2>Finding layer information</h2></div><div class="prev-next"></div>')
def test_the_sentence_asking_for_permission_to_call_an_api_is_read_with_its_action_and_resource():
built = f.build(page(ASKS))
assert built["apiPermissions"] == [{
"paragraph": "Make sure that you have permission to call the GetLayerVersion API on the layer version. For "
"Event Functions in your AWS account, you must have this permission in your user policy. To use "
"a layer in another account, the owner of that account must grant your account permission in a "
"resource-based policy.",
"sentence": "Make sure that you have permission to call the GetLayerVersion API on the layer version.",
"action": "lambda:GetLayerVersion", "on": "layer version"}]
def test_a_page_whose_layout_or_wording_changed_is_refused():
with pytest.raises(ValueError, match="asks for permission to call no API"):
f.build(page("<p>Layers are versioned.</p>"))
# A sentence asking for an API AWS rewords is refused rather than dropping its action.
with pytest.raises(ValueError, match="in no wording it used"):
f.build(page(ASKS.replace("Make sure that you have", "You need")))
def test_the_file_is_stale_when_the_page_says_something_else():
vendored = f.build(page(ASKS))
assert not f.stale(vendored, page(ASKS))
assert f.stale(vendored, page(ASKS.replace("on the\n layer version", "on the\n layer")))
@@ -4183,6 +4183,72 @@ def test_an_always_needed_action_the_reference_does_not_list_is_refused():
SECRET_ACTIONS, {"svc:ValidateResourcePolicy"})
LAYERS = {"apiPermissions": [{"sentence": "Make sure that you have permission to call the GetLayerVersion API on the "
"layer version.", "action": "svc:GetLayerVersion", "on": "layer version"}]}
LAYER_ACTIONS = {"svc:CreateFunction": ["function"], "svc:GetLayerVersion": ["layerVersion"],
"svc:GetFunction": ["function"]}
LAYER_MODELS = {"svc": {"operations": {
"CreateFunction": {"input": {"shape": "CreateFunctionRequest"}},
"GetFunction": {"input": {"shape": "GetFunctionRequest"}}}, "shapes": {
"CreateFunctionRequest": {"type": "structure", "members": {"FunctionName": {"shape": "FunctionName"},
"Layers": {"shape": "LayerList"}}},
"GetFunctionRequest": {"type": "structure", "members": {"FunctionName": {"shape": "FunctionName"}}},
"FunctionName": {"type": "string"},
"LayerList": {"type": "list", "member": {"shape": "LayerVersionArn"}},
"LayerVersionArn": {"type": "string", "pattern": "arn:aws:svc:[a-z0-9-]+:\\d{12}:layer:[a-z]+:[0-9]+"}}}}
def test_an_api_the_guide_asks_permission_for_is_checked_on_each_value_of_the_member_holding_its_types_arn():
read = [{"type": "function", "fill": {"FunctionName": "FunctionName"}}]
assert r.api_permission_resources("svc:CreateFunction", "svc:CreateFunction", read, LAYERS, LAYER_ACTIONS,
{"svc:CreateFunction", "svc:GetLayerVersion", "iam:PassRole"},
LAYER_MODELS) == (
[{"type": "function", "fill": {"FunctionName": "FunctionName"}, "action": "svc:CreateFunction"},
{"types": ["layerVersion"], "arn": "Layers[]", "action": "svc:GetLayerVersion"}],
{"svc:CreateFunction": ["function"], "svc:GetLayerVersion": ["layerVersion"]})
assert r._arn_shape_paths(LAYER_MODELS, "CreateFunction", "layerVersion") == ["Layers[]"]
# An operation the rules read nothing of is still checked as the action on what the member gives.
assert r.api_permission_resources("svc:CreateFunction", "svc:CreateFunction", [], LAYERS, LAYER_ACTIONS,
{"svc:CreateFunction", "svc:GetLayerVersion"}, LAYER_MODELS)[0] == [
{"types": ["layerVersion"], "arn": "Layers[]", "action": "svc:GetLayerVersion"}]
def test_an_operation_not_authorized_by_the_api_or_holding_no_such_member_keeps_its_reading():
read = [{"type": "function", "fill": {"FunctionName": "FunctionName"}}]
assert r.api_permission_resources("svc:CreateFunction", "svc:CreateFunction", read, LAYERS, LAYER_ACTIONS,
{"svc:CreateFunction", "iam:PassRole"}, LAYER_MODELS) == (read, None)
assert r.api_permission_resources("svc:GetFunction", "svc:GetFunction", read, LAYERS, LAYER_ACTIONS,
{"svc:GetFunction", "svc:GetLayerVersion"}, LAYER_MODELS) == (read, None)
# The API's own operation is checked as that action already.
assert r.api_permission_resources("svc:GetLayerVersion", "svc:GetLayerVersion", read, LAYERS, LAYER_ACTIONS,
{"svc:GetLayerVersion"}, LAYER_MODELS) == (read, None)
def test_an_api_asked_for_on_no_type_the_reference_gives_its_action_is_refused():
read = [{"type": "function", "fill": {"FunctionName": "FunctionName"}}]
with pytest.raises(ValueError, match="check svc:GetLayerVersion on the layer version, no type the Service "
"Reference gives that action"):
r.api_permission_resources("svc:CreateFunction", "svc:CreateFunction", read, LAYERS,
{**LAYER_ACTIONS, "svc:GetLayerVersion": ["layer"]},
{"svc:CreateFunction", "svc:GetLayerVersion"}, LAYER_MODELS)
def test_an_api_check_the_reference_no_longer_lists_as_authorizing_the_operation_is_drift(monkeypatch):
monkeypatch.setattr(r, "load_permission_source", lambda namespace: LAYERS if namespace == "svc" else None)
vendored = {"operations": {"svc:CreateFunction": {"action": "svc:CreateFunction", "types": ["function"],
"actions": {"svc:CreateFunction": ["function"],
"svc:GetLayerVersion": ["layerVersion"]}}}}
def documents(*actions: str) -> list[dict]:
return [{"Name": "svc", "Operations": [{"Name": "CreateFunction", "AuthorizedActions": [
{"Service": "svc", "Name": action} for action in actions]}]}]
assert r.verify_api_actions(vendored, documents("CreateFunction", "GetLayerVersion")) == []
assert r.verify_api_actions(vendored, documents("CreateFunction")) == [
"AWS no longer lists svc:GetLayerVersion among the actions svc:CreateFunction is authorized by, as the file "
"checks it"]
def test_an_example_arn_with_a_variable_empty_names_it_empty_for_a_request_leaving_its_member_out():
package = {"type": "package", "fill": {"DomainName": "domain", "PackageFormat": "format", "PackageName": "package",
"PackageNamespace": "namespace", "RepositoryName": "repository"},