fix(cloudformation): check CloudFormation requests on the resources they name, from the generated request resources (#8426)

CloudFormation was not read by the request-resources generator, so under IAM
enforcement every CloudFormation request was checked on *: a grant scoped to a
stack or a stack set was refused, and a deny scoped to one never applied.
cloudformation now moves into NAMESPACES (100 operations). One rule is fixed:
an account member named after another record's shape names that record's
account, not the type's (StackInstanceAccount is a StackInstance's), so a
stack instance call is checked on its stack set in the caller's account.

A stack or a stack set named by its name is checked on the ARN CloudFormation
minted for it, which CloudFormationStoredResourceArns finds, reading only, or
with its id open when it does not exist yet. A request naming its stack by
no StackName (a change set by its ARN alone, DescribeStackResources by
PhysicalResourceId alone) stays on *, as the generated data gives it.
DescribeStackSet now returns StackSetARN, which botocore gives and Floci
left out, in the Region of the request naming it.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-15 09:59:32 -04:00
1 parent 9c1e5c1163
commit 0f223224ce
11 files changed
+371 -13

No files matched your search

+15 -1
View File
@@ -62,9 +62,23 @@ changing credentials already issued.
| `ListStackSetAutoDeploymentTargets` | - |
<!-- floci:actions:end -->
## IAM Enforcement
With IAM enforcement on, each CloudFormation request is checked on the resources it names, from the generated request
resources: a stack by its name or its stack id, at the ARN CloudFormation minted for it
(`stack/<name>/<id>`), and a stack set by its name, at its ARN (`stackset/<name>:<id>`), each found in the caller's
account and Region; a stack or stack set that does not exist yet, as a create names it, is checked with its id open
(`stack/<name>/*`). A stack instance is checked on its stack set in the caller's account, whatever account the
instance is in. An operation whose action has no resource type in the Service Authorization Reference (`ListStacks`,
`ListStackSets`, `ValidateTemplate`, `CreateStackSet`, the Organizations access calls) is checked on `*`, and so is a
request naming its stack by no `StackName` (a change set by its ARN alone, `DescribeStackResources` by
`PhysicalResourceId` alone), the generated data filling the stack from `StackName` only. The
`stackset-target` and `type` resources the reference also lists for the stack instance and stack set update calls are
not checked: no member of those requests gives them.
## StackSets compatibility
StackSets support both `SELF_MANAGED` and the Cloud Launchpad `SERVICE_MANAGED` workflow. `ActivateOrganizationsAccess` requires an Organizations management account with all features enabled and enables trusted access for `stacksets.cloudformation.amazonaws.com`. Service-managed organizational-unit deployment targets are resolved from the caller's actual Organizations state rather than converted into synthetic account IDs. Targeting an OU includes eligible accounts directly in that OU and in all descendant OUs, while excluding the organization management account, matching AWS StackSets targeting semantics. `DescribeStackSet` returns the stack set's `Tags` and, for a service-managed stack set, the root and OU ids its instances were created for as `OrganizationalUnitIds`.
StackSets support both `SELF_MANAGED` and the Cloud Launchpad `SERVICE_MANAGED` workflow. `ActivateOrganizationsAccess` requires an Organizations management account with all features enabled and enables trusted access for `stacksets.cloudformation.amazonaws.com`. Service-managed organizational-unit deployment targets are resolved from the caller's actual Organizations state rather than converted into synthetic account IDs. Targeting an OU includes eligible accounts directly in that OU and in all descendant OUs, while excluding the organization management account, matching AWS StackSets targeting semantics. `DescribeStackSet` returns the stack set's ARN as `StackSetARN`, its `Tags` and, for a service-managed stack set, the root and OU ids its instances were created for as `OrganizationalUnitIds`.
With `AutoDeployment` enabled, a service-managed stack set follows its organization. An account created in, invited into or moved under a targeted root or OU gets an instance in every Region of the targets that now cover it, and an account moved out of every target or removed from the organization loses its instances; their stacks stay when `RetainStacksOnAccountRemoval` is set. Account placement changes are reconciled asynchronously, so Organizations calls do not wait for deployments and deployment failures do not undo completed account changes. A second `CreateStackInstances` for a target already recorded adds its Regions to the earlier ones. Automatic creates and deletes are recorded in `ListStackSetOperations` and `DescribeStackSetOperation`, with their timestamps and success or failure status. An account move that needs no instance changes records no operation. A returning account uses a distinct backing-stack name when its previous name remains occupied; the retained stack is not reassociated.
@@ -25,7 +25,8 @@ import java.util.Optional;
* the key an alias names; EMR, for the clusters of its instance groups; IAM Identity Center, for the accounts its
* permission sets are provisioned to; Resource Explorer, for its default view; OAM and RAM, for the sinks,
* invitations and shares of other accounts they act on; Secrets Manager, for the secret a name or an ARN names,
* random suffix included, and its tags); looked up lazily by {@code ResourceArnBuilder} and
* random suffix included, and its tags; EventBridge Scheduler, for its default schedule group; CloudFormation, for
* the stack or the stack set a name names, whose id it minted); looked up lazily by {@code ResourceArnBuilder} and
* {@code IamConditionContextResolver} through {@code Instance<StoredResourceArns>} for the namespace a request or an
* ARN is of, so IAM never depends on that service directly.</p>
*
@@ -92,7 +92,7 @@ public class CloudFormationQueryHandler {
case "DescribeOrganizationsAccess" -> describeOrganizationsAccess();
case "ActivateOrganizationsAccess" -> activateOrganizationsAccess();
case "CreateStackSet" -> createStackSet(params);
case "DescribeStackSet" -> describeStackSet(params);
case "DescribeStackSet" -> describeStackSet(params, region);
case "ListStackSets" -> listStackSets();
case "UpdateStackSet" -> updateStackSet(params);
case "DeleteStackSet" -> deleteStackSet(params);
@@ -922,7 +922,7 @@ public class CloudFormationQueryHandler {
}
}
private Response describeStackSet(MultivaluedMap<String, String> params) {
private Response describeStackSet(MultivaluedMap<String, String> params, String region) {
try {
StackSet ss = stackSetService.describeStackSet(params.getFirst("StackSetName"));
XmlBuilder xml = new XmlBuilder()
@@ -931,6 +931,7 @@ public class CloudFormationQueryHandler {
.start("StackSet")
.elem("StackSetName", ss.getStackSetName())
.elem("StackSetId", ss.getStackSetId())
.elem("StackSetARN", stackSetService.stackSetArn(ss, region))
.elem("Status", ss.getStatus())
.elem("Description", ss.getDescription())
.elem("TemplateBody", ss.getTemplateBody())
@@ -443,6 +443,14 @@ public class CloudFormationService implements ResourceProvider {
.toList();
}
/**
* The id of the live stack a name or a stack id names in the caller's account and the Region, its ARN with the id
* CloudFormation minted, which IAM checks a request naming the stack on; empty when there is none. Reads only.
*/
public Optional<String> stackArn(String stackNameOrArn, String region) {
return Optional.ofNullable(resolveStack(stackNameOrArn, region, currentAccount())).map(Stack::getStackId);
}
/**
* The stack's current parameter values, or an empty map if it does not exist (yet). Used to
* resolve {@code UsePreviousValue} on an update before the stack lookup that
@@ -0,0 +1,42 @@
package io.floci.aws.services.cloudformation;
import io.floci.aws.core.common.StoredResourceArns;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import java.util.List;
import java.util.Optional;
/**
* What IAM asks CloudFormation of the resources a request names: the ARN of the stack or the stack set a name names,
* whose id CloudFormation minted, so a request naming one by its name is checked on the ARN AWS checks.
*/
@ApplicationScoped
public class CloudFormationStoredResourceArns implements StoredResourceArns {
private final CloudFormationService stacks;
private final StackSetService stackSets;
@Inject
public CloudFormationStoredResourceArns(CloudFormationService stacks, StackSetService stackSets) {
this.stacks = stacks;
this.stackSets = stackSets;
}
@Override
public String namespace() {
return "cloudformation";
}
@Override
public Optional<String> find(String type, List<String> names, String region) {
if (names.size() != 1) {
return Optional.empty();
}
return switch (type) {
case "stack" -> stacks.stackArn(names.getFirst(), region);
case "stackset" -> stackSets.stackSetArn(names.getFirst(), region);
default -> Optional.empty();
};
}
}
@@ -213,6 +213,20 @@ public class StackSetService implements PassedRoleLookup, AccountPlacementListen
return getStackSetOrThrow(name);
}
/** The stack set's ARN, {@code stackset/<name>:<id>} in the request's Region, as AWS gives its StackSetARN. */
/** The stack set's ARN in the Region given, the one the request naming it is in, whatever context runs it. */
public String stackSetArn(StackSet stackSet, String region) {
return regionResolver.buildArn("cloudformation", region, "stackset/" + stackSet.getStackSetId());
}
/**
* The ARN of the caller's stack set of that name in the Region given, which IAM checks a request naming it on;
* empty for none.
*/
public Optional<String> stackSetArn(String name, String region) {
return name == null ? Optional.empty() : stackSets.get(name).map(stackSet -> stackSetArn(stackSet, region));
}
/** The StackSet's permission model, which says whether an update naming no administration role passes the default one. */
@Override
public Optional<String> stackSetPermissionModel(String stackSetName) {
@@ -1,11 +1,11 @@
{
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "--source-dir /tmp/claude-1000/-home-depende-eclipse-workspace-floci-priamo-w/7fb47f8b-d191-43e7-b4fe-2f9ad25437c8/scratchpad/lam/ref", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-15", "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"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "ram": ["ram"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-15", "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"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "ram": ["ram"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "logs", "pipes", "resource-groups", "s3", "sns", "sqs", "sts"],
"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", "appconfig": "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", "appsync": "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", "aps": "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", "backup": "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", "batch": "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", "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", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "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", "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", "codeguru-reviewer": "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", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2-instance-connect": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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", "elasticfilesystem": "REST: its requests namLine truncated
"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", "appconfig": "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", "appsync": "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", "aps": "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", "backup": "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", "batch": "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", "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", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "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", "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", "codeguru-reviewer": "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", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2-instance-connect": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST rLine truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "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", "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", "emr-containers", "end-user-messaging", "entityresolution", "evs", "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", "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", "ssmmessages", "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}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:${Partition}:cloudfront::${Account}:response-headers-policy/${Id}", "streaming-distribution": "arn:${Partition}:cloudfront::${Account}:streaming-distribution/${DistributionId}", "trust-store": "arn:${Partition}:cloudfront::${Account}:trust-store/${Id}", "vpcorigin": "arn:${Partition}:cloudfront::${Account}:vpcorigin/${Id}"}, "cloudfront-keyvaluestore": {"key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${ResourceId}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Line 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/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-resource-discovery": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-resource-discovery-associatioLine truncated
"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}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line 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/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:Line 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"]},
@@ -320,6 +320,106 @@
"ce:UpdateAnomalySubscription": {"action": "ce:UpdateAnomalySubscription", "types": ["anomalysubscription"], "resources": [{"types": ["anomalysubscription"], "arn": "MonitorArnList[]"}, {"types": ["anomalysubscription"], "arn": "SubscriptionArn"}]},
"ce:UpdateCostAllocationTagsStatus": {"action": "ce:UpdateCostAllocationTagsStatus", "types": [], "resources": []},
"ce:UpdateCostCategoryDefinition": {"action": "ce:UpdateCostCategoryDefinition", "types": ["costcategory"], "resources": [{"types": ["costcategory"], "arn": "CostCategoryArn"}]},
"cloudformation:ActivateOrganizationsAccess": {"action": "cloudformation:ActivateOrganizationsAccess", "types": [], "resources": []},
"cloudformation:ActivateType": {"action": "cloudformation:ActivateType", "types": [], "resources": []},
"cloudformation:BatchDescribeTypeConfigurations": {"action": "cloudformation:BatchDescribeTypeConfigurations", "types": [], "resources": []},
"cloudformation:CancelResourceRequest": {"action": "cloudformation:CancelResourceRequest", "types": [], "resources": []},
"cloudformation:CancelUpdateStack": {"action": "cloudformation:CancelUpdateStack", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:ContinueUpdateRollback": {"action": "cloudformation:ContinueUpdateRollback", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "RoleARN"}, {"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:CreateChangeSet": {"action": "cloudformation:CreateChangeSet", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "NotificationARNs[]"}, {"types": ["stack"], "arn": "RoleARN"}, {"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:CreateGeneratedTemplate": {"action": "cloudformation:CreateGeneratedTemplate", "types": [], "resources": [], "makes": [{"type": "generatedtemplate", "fill": {}}]},
"cloudformation:CreateResource": {"action": "cloudformation:CreateResource", "types": [], "resources": []},
"cloudformation:CreateStack": {"action": "cloudformation:CreateStack", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "NotificationARNs[]"}, {"types": ["stack"], "arn": "RoleARN"}, {"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:CreateStackInstances": {"action": "cloudformation:CreateStackInstances", "types": ["stackset", "stackset-target", "type"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}, {"types": ["type"], "through": "OperationId"}]},
"cloudformation:CreateStackRefactor": {"action": "cloudformation:CreateStackRefactor", "types": ["stack"], "resources": []},
"cloudformation:CreateStackSet": {"action": "cloudformation:CreateStackSet", "types": [], "resources": [], "makes": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:DeactivateOrganizationsAccess": {"action": "cloudformation:DeactivateOrganizationsAccess", "types": [], "resources": []},
"cloudformation:DeactivateType": {"action": "cloudformation:DeactivateType", "types": [], "resources": []},
"cloudformation:DeleteChangeSet": {"action": "cloudformation:DeleteChangeSet", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DeleteGeneratedTemplate": {"action": "cloudformation:DeleteGeneratedTemplate", "types": [], "resources": []},
"cloudformation:DeleteResource": {"action": "cloudformation:DeleteResource", "types": [], "resources": []},
"cloudformation:DeleteStack": {"action": "cloudformation:DeleteStack", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "RoleARN"}, {"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DeleteStackInstances": {"action": "cloudformation:DeleteStackInstances", "types": ["stackset", "stackset-target", "type"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}, {"types": ["type"], "through": "OperationId"}]},
"cloudformation:DeleteStackSet": {"action": "cloudformation:DeleteStackSet", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:DeregisterType": {"action": "cloudformation:DeregisterType", "types": [], "resources": []},
"cloudformation:DescribeAccountLimits": {"action": "cloudformation:DescribeAccountLimits", "types": [], "resources": []},
"cloudformation:DescribeChangeSet": {"action": "cloudformation:DescribeChangeSet", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeChangeSetHooks": {"action": "cloudformation:DescribeChangeSetHooks", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeEvents": {"action": "cloudformation:DescribeEvents", "types": ["changeset", "stack"], "resources": [{"type": "changeset", "fill": {"ChangeSetName": "ChangeSetName"}}, {"type": "stack", "fill": {"StackName": "StackName"}}, {"types": ["stack"], "through": "OperationId"}]},
"cloudformation:DescribeGeneratedTemplate": {"action": "cloudformation:DescribeGeneratedTemplate", "types": [], "resources": []},
"cloudformation:DescribeOrganizationsAccess": {"action": "cloudformation:DescribeOrganizationsAccess", "types": [], "resources": []},
"cloudformation:DescribePublisher": {"action": "cloudformation:DescribePublisher", "types": [], "resources": []},
"cloudformation:DescribeResourceScan": {"action": "cloudformation:DescribeResourceScan", "types": [], "resources": []},
"cloudformation:DescribeStackDriftDetectionStatus": {"action": "cloudformation:DescribeStackDriftDetectionStatus", "types": [], "resources": []},
"cloudformation:DescribeStackEvents": {"action": "cloudformation:DescribeStackEvents", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeStackInstance": {"action": "cloudformation:DescribeStackInstance", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:DescribeStackRefactor": {"action": "cloudformation:DescribeStackRefactor", "types": ["stack"], "resources": []},
"cloudformation:DescribeStackResource": {"action": "cloudformation:DescribeStackResource", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeStackResourceDrifts": {"action": "cloudformation:DescribeStackResourceDrifts", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeStackResources": {"action": "cloudformation:DescribeStackResources", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeStackSet": {"action": "cloudformation:DescribeStackSet", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:DescribeStackSetOperation": {"action": "cloudformation:DescribeStackSetOperation", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:DescribeStacks": {"action": "cloudformation:DescribeStacks", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DescribeType": {"action": "cloudformation:DescribeType", "types": [], "resources": []},
"cloudformation:DescribeTypeRegistration": {"action": "cloudformation:DescribeTypeRegistration", "types": [], "resources": []},
"cloudformation:DetectStackDrift": {"action": "cloudformation:DetectStackDrift", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DetectStackResourceDrift": {"action": "cloudformation:DetectStackResourceDrift", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:DetectStackSetDrift": {"action": "cloudformation:DetectStackSetDrift", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:EstimateTemplateCost": {"action": "cloudformation:EstimateTemplateCost", "types": [], "resources": []},
"cloudformation:ExecuteChangeSet": {"action": "cloudformation:ExecuteChangeSet", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:ExecuteStackRefactor": {"action": "cloudformation:ExecuteStackRefactor", "types": ["stack"], "resources": []},
"cloudformation:GetGeneratedTemplate": {"action": "cloudformation:GetGeneratedTemplate", "types": [], "resources": []},
"cloudformation:GetHookResult": {"action": "cloudformation:GetHookResult", "types": [], "resources": []},
"cloudformation:GetResource": {"action": "cloudformation:GetResource", "types": [], "resources": []},
"cloudformation:GetResourceRequestStatus": {"action": "cloudformation:GetResourceRequestStatus", "types": [], "resources": []},
"cloudformation:GetStackPolicy": {"action": "cloudformation:GetStackPolicy", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:GetTemplate": {"action": "cloudformation:GetTemplate", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:GetTemplateSummary": {"action": "cloudformation:GetTemplateSummary", "types": ["stack", "stackset"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}, {"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ImportStacksToStackSet": {"action": "cloudformation:ImportStacksToStackSet", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ListChangeSets": {"action": "cloudformation:ListChangeSets", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:ListExports": {"action": "cloudformation:ListExports", "types": [], "resources": []},
"cloudformation:ListGeneratedTemplates": {"action": "cloudformation:ListGeneratedTemplates", "types": [], "resources": []},
"cloudformation:ListHookResults": {"action": "cloudformation:ListHookResults", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "TypeArn"}]},
"cloudformation:ListImports": {"action": "cloudformation:ListImports", "types": [], "resources": []},
"cloudformation:ListResourceRequests": {"action": "cloudformation:ListResourceRequests", "types": [], "resources": []},
"cloudformation:ListResourceScanRelatedResources": {"action": "cloudformation:ListResourceScanRelatedResources", "types": [], "resources": []},
"cloudformation:ListResourceScanResources": {"action": "cloudformation:ListResourceScanResources", "types": [], "resources": []},
"cloudformation:ListResourceScans": {"action": "cloudformation:ListResourceScans", "types": [], "resources": []},
"cloudformation:ListResources": {"action": "cloudformation:ListResources", "types": [], "resources": []},
"cloudformation:ListStackInstanceResourceDrifts": {"action": "cloudformation:ListStackInstanceResourceDrifts", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ListStackInstances": {"action": "cloudformation:ListStackInstances", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ListStackRefactorActions": {"action": "cloudformation:ListStackRefactorActions", "types": ["stack"], "resources": []},
"cloudformation:ListStackRefactors": {"action": "cloudformation:ListStackRefactors", "types": ["stack"], "resources": []},
"cloudformation:ListStackResources": {"action": "cloudformation:ListStackResources", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:ListStackSetAutoDeploymentTargets": {"action": "cloudformation:ListStackSetAutoDeploymentTargets", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ListStackSetOperationResults": {"action": "cloudformation:ListStackSetOperationResults", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ListStackSetOperations": {"action": "cloudformation:ListStackSetOperations", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:ListStackSets": {"action": "cloudformation:ListStackSets", "types": [], "resources": []},
"cloudformation:ListStacks": {"action": "cloudformation:ListStacks", "types": [], "resources": []},
"cloudformation:ListTypeRegistrations": {"action": "cloudformation:ListTypeRegistrations", "types": [], "resources": []},
"cloudformation:ListTypeVersions": {"action": "cloudformation:ListTypeVersions", "types": [], "resources": []},
"cloudformation:ListTypes": {"action": "cloudformation:ListTypes", "types": [], "resources": []},
"cloudformation:PublishType": {"action": "cloudformation:PublishType", "types": [], "resources": []},
"cloudformation:RecordHandlerProgress": {"action": "cloudformation:RecordHandlerProgress", "types": ["stack"], "resources": []},
"cloudformation:RegisterPublisher": {"action": "cloudformation:RegisterPublisher", "types": [], "resources": []},
"cloudformation:RegisterType": {"action": "cloudformation:RegisterType", "types": [], "resources": [], "makes": [{"type": "type", "fill": {"Type": "Type"}}]},
"cloudformation:RemoveAlias": {"action": "cloudformation:RemoveAlias", "types": ["stack"], "resources": []},
"cloudformation:RollbackStack": {"action": "cloudformation:RollbackStack", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "RoleARN"}, {"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:SetAlias": {"action": "cloudformation:SetAlias", "types": ["stack"], "resources": []},
"cloudformation:SetStackPolicy": {"action": "cloudformation:SetStackPolicy", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:SetTypeConfiguration": {"action": "cloudformation:SetTypeConfiguration", "types": [], "resources": []},
"cloudformation:SetTypeDefaultVersion": {"action": "cloudformation:SetTypeDefaultVersion", "types": [], "resources": []},
"cloudformation:SignalResource": {"action": "cloudformation:SignalResource", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:StartResourceScan": {"action": "cloudformation:StartResourceScan", "types": [], "resources": [], "makes": [{"type": "resourcescan", "fill": {}}]},
"cloudformation:StopStackSetOperation": {"action": "cloudformation:StopStackSetOperation", "types": ["stackset"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}]},
"cloudformation:TestType": {"action": "cloudformation:TestType", "types": [], "resources": []},
"cloudformation:UpdateGeneratedTemplate": {"action": "cloudformation:UpdateGeneratedTemplate", "types": [], "resources": []},
"cloudformation:UpdateResource": {"action": "cloudformation:UpdateResource", "types": [], "resources": []},
"cloudformation:UpdateStack": {"action": "cloudformation:UpdateStack", "types": ["stack"], "resources": [{"types": ["stack"], "arn": "NotificationARNs[]"}, {"types": ["stack"], "arn": "RoleARN"}, {"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:UpdateStackInstances": {"action": "cloudformation:UpdateStackInstances", "types": ["stackset", "stackset-target", "type"], "resources": [{"type": "stackset", "fill": {"StackSetName": "StackSetName"}}, {"types": ["type"], "through": "OperationId"}]},
"cloudformation:UpdateStackSet": {"action": "cloudformation:UpdateStackSet", "types": ["stackset", "stackset-target", "type"], "resources": [{"types": ["stackset", "stackset-target", "type"], "arn": "AdministrationRoleARN"}, {"type": "stackset", "fill": {"StackSetName": "StackSetName"}}, {"types": ["type"], "through": "OperationId"}]},
"cloudformation:UpdateTerminationProtection": {"action": "cloudformation:UpdateTerminationProtection", "types": ["stack"], "resources": [{"type": "stack", "fill": {"StackName": "StackName"}}]},
"cloudformation:ValidateTemplate": {"action": "cloudformation:ValidateTemplate", "types": [], "resources": []},
"cloudfront-keyvaluestore:DeleteKey": {"action": "cloudfront-keyvaluestore:DeleteKey", "types": ["key-value-store"], "resources": [{"types": ["key-value-store"], "arn": "KvsARN"}], "located": {"KvsARN": "{KvsARN}"}},
"cloudfront-keyvaluestore:DescribeKeyValueStore": {"action": "cloudfront-keyvaluestore:DescribeKeyValueStore", "types": ["key-value-store"], "resources": [{"types": ["key-value-store"], "arn": "KvsARN"}], "located": {"KvsARN": "{KvsARN}"}},
"cloudfront-keyvaluestore:GetKey": {"action": "cloudfront-keyvaluestore:GetKey", "types": ["key-value-store"], "resources": [{"types": ["key-value-store"], "arn": "KvsARN"}], "located": {"KvsARN": "{KvsARN}"}},
@@ -0,0 +1,134 @@
package io.floci.aws.services.cloudformation;
import io.floci.aws.testing.EnforcementFixtures;
import io.floci.aws.testing.IamEnforcementProfile;
import io.floci.aws.testing.PartitionCleanup;
import io.floci.aws.testing.RestAssuredJsonUtils;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import io.restassured.response.ValidatableResponse;
import io.restassured.specification.RequestSpecification;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import java.net.URI;
import java.util.Map;
import java.util.UUID;
import static io.floci.aws.testing.EnforcementFixtures.auth;
import static io.restassured.RestAssured.given;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.matchesPattern;
import static org.hamcrest.Matchers.not;
/**
* Under IAM enforcement a CloudFormation request is checked on the stack or the stack set it names, at the ARN
* CloudFormation minted for it, whether the request names it by its name or by that ARN; a stack instance is checked
* on its stack set in the caller's account. A grant scoped to one reaches it and no other.
*/
@QuarkusTest
@TestProfile(IamEnforcementProfile.class)
class CloudFormationIamIntegrationTest {
private static final String ACCOUNT = "000000000473";
private static final String REGION = "us-east-1";
private static final String TEMPLATE =
"{\"Resources\":{\"Handle\":{\"Type\":\"AWS::CloudFormation::WaitConditionHandle\"}}}";
@TestHTTPResource
URI endpoint;
@RegisterExtension
final PartitionCleanup cleanup = new PartitionCleanup();
@BeforeAll
static void configureRestAssured() {
RestAssuredJsonUtils.configureAwsContentTypes();
}
@Test
void aStackScopedGrantReachesThatStackByNameOrIdAndNoOther() {
String mine = name();
String other = name();
String stackId = stack(mine);
stack(other);
assertThat(stackId, matchesPattern("arn:aws:cloudformation:" + REGION + ":" + ACCOUNT + ":stack/" + mine
+ "/[0-9a-f-]+"));
String user = user(allow(stackId, "cloudformation:DescribeStacks", "cloudformation:GetTemplate"));
call(user, "DescribeStacks", Map.of("StackName", mine)).statusCode(200)
.body(containsString("<StackId>" + stackId + "</StackId>"));
call(user, "DescribeStacks", Map.of("StackName", stackId)).statusCode(200);
call(user, "GetTemplate", Map.of("StackName", mine)).statusCode(200);
denied(call(user, "DescribeStacks", Map.of("StackName", other)), "cloudformation:DescribeStacks");
}
@Test
void aStackSetIsCheckedOnTheArnCloudFormationGivesIt() {
String mine = name();
String other = name();
stackSet(mine);
stackSet(other);
String arn = call(ACCOUNT, "DescribeStackSet", Map.of("StackSetName", mine)).statusCode(200)
.extract().xmlPath().getString("DescribeStackSetResponse.DescribeStackSetResult.StackSet.StackSetARN");
assertThat(arn, matchesPattern("arn:aws:cloudformation:" + REGION + ":" + ACCOUNT + ":stackset/" + mine
+ ":[0-9a-f-]+"));
String user = user(allow(arn, "cloudformation:DescribeStackSet", "cloudformation:DescribeStackInstance"));
call(user, "DescribeStackSet", Map.of("StackSetName", mine)).statusCode(200);
denied(call(user, "DescribeStackSet", Map.of("StackSetName", other)), "cloudformation:DescribeStackSet");
// A stack instance is checked on its stack set, in the caller's account whatever account the instance is in.
call(user, "DescribeStackInstance", Map.of("StackSetName", mine, "StackInstanceAccount", "111122223333",
"StackInstanceRegion", REGION)).statusCode(not(equalTo(403)));
denied(call(user, "DescribeStackInstance", Map.of("StackSetName", other, "StackInstanceAccount",
"111122223333", "StackInstanceRegion", REGION)), "cloudformation:DescribeStackInstance");
}
private String stack(String name) {
String id = call(ACCOUNT, "CreateStack", Map.of("StackName", name, "TemplateBody", TEMPLATE)).statusCode(200)
.extract().xmlPath().getString("CreateStackResponse.CreateStackResult.StackId");
cleanup.register(() -> call(ACCOUNT, "DeleteStack", Map.of("StackName", name)));
return id;
}
private void stackSet(String name) {
call(ACCOUNT, "CreateStackSet", Map.of("StackSetName", name, "TemplateBody", TEMPLATE)).statusCode(200);
cleanup.register(() -> call(ACCOUNT, "DeleteStackSet", Map.of("StackSetName", name)));
}
private static String name() {
return "iam-" + UUID.randomUUID().toString().substring(0, 8);
}
private static String allow(String resource, String... actions) {
return "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\""
+ String.join("\",\"", actions) + "\"],\"Resource\":\"" + resource + "\"}]}";
}
private static void denied(ValidatableResponse response, String action) {
response.statusCode(403).body(containsString("AccessDenied")).body(containsString(action));
}
private String user(String policy) {
String name = "cfn-" + UUID.randomUUID().toString().substring(0, 8);
String authorization = auth(ACCOUNT, "iam");
String accessKeyId = EnforcementFixtures.createUser(cleanup, endpoint.getPort(), authorization, name)
.accessKeyId();
EnforcementFixtures.putUserPolicy(endpoint.getPort(), authorization, name, "p", policy);
return accessKeyId;
}
private ValidatableResponse call(String accessKeyId, String action, Map<String, String> params) {
RequestSpecification request = given().port(endpoint.getPort())
.header("Authorization", auth(accessKeyId, "cloudformation"))
.contentType("application/x-www-form-urlencoded")
.formParam("Action", action)
.formParam("Version", "2010-05-15");
params.forEach(request::formParam);
return request.when().post("/").then();
}
}
@@ -0,0 +1,30 @@
package io.floci.aws.services.cloudformation;
import io.floci.aws.services.cloudformation.model.StackSet;
import io.floci.aws.testing.InMemoryStorageFactory;
import org.junit.jupiter.api.Test;
import java.util.Map;
import java.util.Optional;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
class StackSetArnTest {
/**
* A stack set's ARN is in the Region of the request naming it, given to the service, whatever context runs it: a
* Step Functions task calls the handler with no HTTP request, in its own Region, which is not the deployment's.
*/
@Test
void aStackSetsArnIsInTheRegionOfTheRequestNamingIt() {
StackSetService service = new StackSetService(mock(CloudFormationService.class),
new InMemoryStorageFactory("000000000000"));
StackSet set = service.createStackSet("regional", "{\"Resources\":{}}", null, null, Map.of(), null);
String arn = "arn:aws:cloudformation:eu-west-1:000000000000:stackset/" + set.getStackSetId();
assertEquals(arn, service.stackSetArn(set, "eu-west-1"));
assertEquals(Optional.of(arn), service.stackSetArn("regional", "eu-west-1"));
assertEquals(Optional.empty(), service.stackSetArn("missing", "eu-west-1"));
}
}
+8 -4
View File
@@ -272,7 +272,7 @@ NAMESPACES = ("access-analyzer", "account", "acm", "application-autoscaling", "a
"payment-cryptography", "quicksight", "ram", "redshift", "redshift-data", "redshift-serverless",
"rekognition", "resource-explorer-2", "route53", "servicediscovery", "servicequotas", "ssm", "sso",
"states", "textract", "timestream-influxdb", "translate", "signer", "xray", "securityhub", "guardduty",
"secretsmanager", "scheduler", "lambda")
"secretsmanager", "scheduler", "lambda", "cloudformation")
# The namespaces whose resources ResourceArnBuilder builds itself.
HAND_BUILT = ("apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "logs", "pipes",
@@ -390,7 +390,6 @@ NOT_COVERED: dict[str, str] = {
"backup": _REST,
"batch": _REST,
"bedrock-agentcore": _REST,
"cloudformation": _LATER,
"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",
@@ -1370,7 +1369,9 @@ def _nested_arns(model: dict, name: str, shape: dict) -> list[str]:
def account_members(models: dict[str, dict], operation: str) -> list[str]:
"""The top-level members of the operation's request whose shape is an account id, by name."""
"""The top-level members of the operation's request whose shape is an account id, by name; not one naming the
account of another record of the service, by that record's shape name (CloudFormation's
`StackInstanceAccount`, the account of a `StackInstance`, not of the stack set it belongs to)."""
found: set[str] = set()
for model in models.values():
spec = model["operations"].get(operation)
@@ -1388,7 +1389,10 @@ def account_members(models: dict[str, dict], operation: str) -> list[str]:
# account of the resource that ARN names, not of one the request acts on.
if name.endswith("Account") and name.removesuffix("Account") + "Arn" in request:
continue
if member.get("location") in BODY_LOCATIONS and shape["type"] == "string" \
qualifier = re.match(r"^(\w+?)Account(?:Id)?$", name[:1].upper() + name[1:])
of_another = qualifier is not None \
and model["shapes"].get(qualifier.group(1), {}).get("type") == "structure"
if member.get("location") in BODY_LOCATIONS and shape["type"] == "string" and not of_another \
and (shape.get("pattern") in ACCOUNT_ID_PATTERNS
or (name in account_names and not CREATING_RE.match(operation))):
found.add(name)
@@ -535,6 +535,16 @@ def test_an_account_member_typed_elsewhere_in_the_service_is_inferred_only_for_n
assert r.account_members(models, "CreateOther") == [member]
def test_an_account_member_naming_another_records_account_gives_none(tmp_path):
# CloudFormation's StackInstanceAccount is the account of a StackInstance, not of the stack set it belongs to.
service = model({"DescribeStackInstance": {"StackInstanceAccount": "AccountId", "OwnerAccount": "AccountId"}})
service["shapes"]["AccountId"]["pattern"] = "^[0-9]{12}$"
service["shapes"]["StackInstance"] = {"type": "structure", "members": {}}
write_models(tmp_path, {"svc": service})
models = r.load_models(tmp_path, {"svc"})
assert r.account_members(models, "DescribeStackInstance") == ["OwnerAccount"]
def test_account_member_inference_does_not_cross_service_models(tmp_path):
write_models(tmp_path, {"svc": model({"GetThing": {"ownerAccount": "String"}}),
"other": model({"ListThings": {"ownerAccount": "AccountId"}})})