Trust

What Agniworks deploys in your AWS account, and why

The IAM role you create for Agniworks: every permission it grants and why, what it can't do, what Agniworks builds in your account, and how to remove it.

Agniworks reaches your AWS account through an IAM role that you create, by deploying an Agniworks CloudFormation stack. This page lists everything that stack creates, every IAM permission it grants and why, what Agniworks creates in your account afterward, and how to remove all of it.

Last updated 2026-11-04. The templates are agniworks-manual-trust.yaml and agniworks-trust-role.yaml; Agniworks support can send you the exact copy your Launch AWS Stack link deploys.

At a glance

Which template you deploy depends on how you run Agniworks:

ModeTemplateWhat Agniworks can do
Manualagniworks-manual-trust.yamlRead the data-source secrets you name, and, if you choose, run Amazon Bedrock models. Nothing else. Agniworks generates the infrastructure code and you deploy it yourself.
Human in the Loop and Full Automationagniworks-trust-role.yamlBuild and run the data lakehouse, data pipelines, and (if your plan includes them) Apps, all inside your account.

Who can use the role. Only the one Agniworks control-plane role you name in AgniPrincipalArn, and only when it presents the External ID generated for your workspace. Not the whole Agniworks AWS account, and nobody else.

What the role can't do, whatever else it's allowed:

  • Read objects from your S3 buckets. An explicit Deny blocks every S3 object-read action (GetObject and its variants) on every bucket except Agniworks' own: agniworks-athena-results-<account>, agniworks-glue-artifacts-<account>-<region>, agniworks-apps-artifacts-<account>-<region>, agniworks-apps-athena-results-<account>-<region> and the agniworks-lakehouse-bronze/silver/gold-<account> lakehouse storage. An explicit Deny can't be overridden by any Allow.
  • Read your secrets. Only secrets under agniworks/ (which Agniworks creates), secrets you tag AgniworksAccess=allowed for a pipeline to use, or in Manual mode the ones you list. It can't list your secrets either.
  • Give itself more access. Every IAM role Agniworks creates must carry the AgniworksExecutionRolePermissionBoundary permissions boundary, which caps what the role can ever do and denies IAM changes. Agniworks can't remove or change that boundary.
  • Change your CloudFormation stacks. It can only read stacks whose names start with Agniworks or agniworks.
  • Use Amazon Bedrock when you chose Agniworks-managed models. The stack then attaches an explicit Deny on every Bedrock action.

Where a permission does apply to every resource of its type ("Resource": "*"), it's because AWS gives that action no narrower resource to name. Each one is listed under Permissions that apply account-wide.

The Manual-mode template

agniworks-manual-trust.yaml creates one IAM role, Agniworks-Manual-Secrets-Role-<region>, and nothing else.

ParameterWhat it's for
AgniPrincipalArnThe Agniworks control-plane role allowed to assume this role.
ExternalIdThe secret your workspace presents when assuming the role (prevents the "confused deputy" problem).
SecretArnPatternRequired. The Secrets Manager ARNs holding your data-source credentials: exact ARNs, or a name prefix ending in * such as arn:aws:secretsmanager:us-east-1:111122223333:secret:agniworks/*. Account-wide or region-wide wildcards are rejected.
GrantBedrockAccesstrue to run your chosen Bedrock models in this account; false if you chose Agniworks-managed models, in which case the role has no Bedrock access.
AgniAccountIdThe Agniworks control-plane account, kept for reference only.

Its three policies are in Every IAM statement below.

The full template (Human in the Loop and Full Automation)

agniworks-trust-role.yaml creates the role Agniworks uses, plus a private build pipeline that runs inside your account, so lakehouse infrastructure is created by your account's own CodeBuild rather than from outside it.

ParameterWhat it's for
AgniPrincipalArn, ExternalId, AgniAccountIdAs for the Manual template.
GrantBedrockAccesstrue attaches Bedrock discovery and invocation; false attaches an explicit Deny on all of Bedrock.
ManageLakeFormationAdminstrue makes the stack itself add the Agniworks roles to your Lake Formation administrators; it's meant for a new, dedicated account. false (default) leaves the list to setup, below. Either way, existing administrators are never removed.

What the stack creates (<region> and <account> are filled in by AWS):

ResourceNameWhy
IAM roleAgniworks-Access-Role-<region>The role Agniworks assumes. Its permissions are the managed policies below; it has no AWS-managed policies such as ReadOnlyAccess.
IAM managed policiesAgniworksTrustDiscoveryPolicy, AgniworksTrustSecretsPolicy, AgniworksTrustLakehousePolicy, AgniworksTrustPipelineOrchestrationPolicy, AgniworksTrustAppsRuntimePolicy, AgniworksTrustAppsNetworkPolicy, AgniworksDataCatalog-<region>, and one Bedrock policyThe access role's permissions, split by feature. CloudFormation prefixes the first six with the stack name.
IAM managed policyAgniworksExecutionRolePermissionBoundaryNot attached to anything at creation. It's the permissions boundary every role Agniworks creates later must carry.
IAM roleAgniworks-CodeBuild-Role-<region>Runs the lakehouse build (AgniworksInfrastructureProvisioningPolicy).
IAM role<stack>-CodePipelineServiceRole-<id>Lets the pipeline move the build's source and artifacts.
IAM roleAgniworksLakeFormationDataAccessRole-<region>Assumed only by Lake Formation, to reach the lakehouse's S3 Tables data on behalf of queries Lake Formation allows. Carries the AWS-managed AmazonS3TablesLakeFormationServiceRole policy.
IAM roleAgniworksSchedulerRole-<region>Assumed only by EventBridge Scheduler in this account, to start agniworks_* Glue workflows on the schedules you set.
CodeCommit repositoryagniworks-lakehouse-infrastructureHolds the generated OpenTofu (Terraform-compatible) code for your lakehouse. You can read every change Agniworks makes.
CodePipeline pipelineagniworks-lakehouse-pipelineRuns the build when Agniworks pushes a change.
CodeBuild projectagniworks-lakehouse-builderInstalls a pinned, checksum-verified OpenTofu release and applies the code.
S3 bucketagniworks-lakehouse-pipeline-artifactbucket-<account>Pipeline artifacts and the OpenTofu state. Private, encrypted, versioned (old versions expire after 90 days), HTTPS-only.
Lambda function and roleAgniworksS3TablesCatalogBootstrap-<region>Runs once at stack creation. If the account has no S3 Tables catalog in AWS Glue yet, it creates one and grants the Agniworks roles permission inside it. If one exists, it changes nothing and reports the command your administrator can run instead. It never deletes the catalog.
Lambda function and roleAgniworksLakeFormationAdminsBootstrap-<region>Only when ManageLakeFormationAdmins=true. Adds the Agniworks roles to the Lake Formation administrators list, keeping every existing administrator. It never removes anyone, including on stack deletion.

Both Lambda roles carry the AWS-managed AWSLambdaBasicExecutionRole policy, which lets them write their own logs.

What Agniworks creates in your account afterward

Agniworks creates these when you use the feature: with the access role, or, for the lakehouse foundation, through the build pipeline above. Manual mode creates nothing. Names start with agniworks, Agniworks or agniapp. Only the setup network, the Apps security groups and the Glue jobs are tagged (AgniworksManagedBy=Agniworks or ManagedBy=Agniworks); find the rest by name.

Before you start, note three things:

  • Public network access. Setup in a new account builds public subnets (public IP addresses, a default route to the internet). If your plan includes Apps, publishing the first app creates an internet-facing load balancer serving HTTP on port 80, open to any address. Each app link carries a single-use sign-in token the app checks.
  • Account-wide Lake Formation settings. Agniworks registers every S3 table bucket in the account and region with Lake Formation and sets up the Glue s3tablescatalog catalog, because AWS's S3 Tables integration exists once per account and region. If your account already uses S3 Tables with Lake Formation, review this with your Lake Formation administrator first.
  • Costs. Glue job runs, Athena queries, CodeBuild minutes, storage, and for Apps one always-on Fargate task per published app plus the load balancer, are billed to your account.

Setup (Human in the Loop and Full Automation, once)

ResourceNameNotes
VPC, 2 subnets, internet gateway, route tableagniworks-landing-zone-<type>-<account>-<region>New accounts (Greenfield) only, in the address range you give. The subnets assign public IP addresses and route 0.0.0.0/0 to the internet gateway. No NAT gateway. In an existing account (Brownfield), Agniworks uses the VPC and public subnets you name and creates no network.
AWS Budgets budgetAgniworks-<id>-Monthly-BudgetA monthly cost budget for the amount you enter. It emails the setup user and the first Account Admin at 80% (or the threshold you set). It tracks the account's total spend, not only Agniworks resources.
Glue databaseagni_data_catalogWhere Agniworks publishes your catalog: table definitions, descriptions and sensitive-data labels on columns, never the data. Your account's own administrators get full Lake Formation permissions on it.
Lake Formation administratorsAdds Agniworks-Access-Role-<region> and Agniworks-CodeBuild-Role-<region>In an existing account, the access role is removed again as soon as setup's grants are done. The build role stays, because every lakehouse build registers storage and grants permissions. In a new account, both stay.

Lakehouse

Created by the build pipeline from the code in agniworks-lakehouse-infrastructure, except the tables, which Agniworks creates when you approve a model.

ResourceNameNotes
S3 table bucketsagniworks-lakehouse-bronze-<account>, -silver-, -gold-Encrypted.
Namespacestenant_<workspace id>One in each table bucket.
TablesOne per approved model tableAgniworks adds or changes columns when a model changes. It never drops a table.
Glue databaseslakehouse_bronze, lakehouse_silver, lakehouse_gold
Athena data catalogslakehouse_bronze, lakehouse_silver, lakehouse_goldPoint Athena at the table buckets.
S3 bucketagniworks-athena-results-<account>Athena query results. Objects expire after 7 days.
Athena workgroupagniworks_workgroup
Lake Formation registration and grantsAll S3 table buckets (bucket/*); the s3tablescatalog catalog, created or updated to allow full-table access from Athena and GlueGrants go to the Agniworks roles, on the lakehouse namespaces.

Data pipelines

ResourceNameNotes
S3 bucketagniworks-glue-artifacts-<account>-<region>Pipeline job scripts, Glue temporary files and Insight results. Private and encrypted; objects don't expire.
IAM roleAgniworksGlueServiceRole-<id>-<region>Runs the jobs. Carries the permissions boundary, AWS's AWSGlueServiceRole policy, and an Agniworks policy for the lakehouse and Agniworks buckets.
Glue jobsagniworks_<id>_<layer>_<table>Glue 5.0, 2 G.1X workers, 2-hour timeout. Agniworks deletes jobs a redeploy no longer needs.
Glue workflow and triggersagniworks_wf_<id>, agniworks_od_<id>, <job>_trgRun the jobs in order. Removed when no jobs remain.
EventBridge Scheduler scheduleagniworks_sch_<id>Only if you schedule pipelines. Removed when you turn the schedule off.
Secretsagniworks/<workspace id>/ds-…, agniworks/<workspace id>/glue-snowflake-…Data-source credentials you type into Agniworks (deleted with the data source, with a 7-day recovery window), and the copy of a Snowflake key pair a pipeline job uses, stored without its passphrase so the job can use it (deleted with the data source).

Apps (only if your plan includes Apps)

ResourceNameNotes
S3 bucketsagniworks-apps-artifacts-<account>-<region>, agniworks-apps-athena-results-<account>-<region>App builds, and the apps' query results. Query results don't expire.
Athena workgroupagniworks_apps_workgroupEncryption enforced; each query can scan at most 10 GB.
IAM rolesAgniworksAppsExecutionRole-<id>-<region>, AgniworksAppsTaskRole-…, AgniworksAppsCodeBuildRole-…Each carries the permissions boundary.
CodeBuild projectagniworks-apps-build-<id>Builds app images with Docker (privileged mode), from a Python base image on Amazon ECR Public and packages from PyPI.
ECR repositoryagniworks/apps-runtimeScans images on push.
ECS cluster, services and task definitionsagniworks-apps-<id>, agniworks-app-<app id>One Fargate task (0.5 vCPU, 1 GB) per published app, running continuously while it's published, with a public IP address. Unpublishing stops it; deleting the app removes its service.
Load balancer, target groups, rulesagniapp-alb-<id>, agniapp-<…>Internet-facing, HTTP on port 80. Each app is a path rule, removed when you delete the app.
Security groupsagniworks-apps-alb-<id> (port 80 from anywhere), agniworks-apps-task-<id> (the app port, from the load balancer only)
Log group/agniworks/apps/<workspace id>Kept 14 days.

Also

  • S3 Tables data sources get an Athena workgroup, agniworks_s3_tables_workgroup (or one you name), writing results to the Glue artifacts bucket.
  • Amazon Bedrock (when you run models in your account) creates nothing; model calls are billed to your account.
  • AWS creates on its own: the service-linked roles for Lake Formation, ECS and Elastic Load Balancing, and log groups for the builds and Glue jobs (/aws/codebuild/agniworks-*, /aws-glue/jobs/*), which by default never expire.

What Agniworks reads back

Through the role, Agniworks reads Glue table definitions, the results of the Athena queries behind Insights, Apps and the catalog, and your data-source credentials when it connects to a source. It doesn't read objects from your own S3 buckets (see the Deny above).

Permissions that apply account-wide

These statements use "Resource": "*". In every case AWS gives the action no narrower resource to name, or the target is your own data, which Agniworks can't know in advance.

StatementWhy it can't be narrower
AllowGlueMetadataReadReads Glue database and table definitions (never the data) so Agniworks can catalog the tables you connect, including S3 Tables catalogs whose names only exist once you create them.
AllowGlueCatalogManagementCreates and updates the federated Glue catalog entries for the lakehouse's S3 table buckets.
AllowLakeFormationDataAccess, AllowLakeFormationAdminsMerge, AllowLakeFormationBootstrap, LakeFormationAdministration, AllowLakeFormationVendedCredentialsLake Formation has no resource-level permissions in IAM: every Lake Formation action must name *. What each role may do inside Lake Formation is governed by Lake Formation's own grants.
AllowBedrockModelDiscoveryListing Bedrock models and inference profiles has no resource.
AllowAppsRuntimeEcrLogin, AllowAppsRuntimeLogGroupLookup, AllowAppsRuntimeEcsAndAlbReads, AllowAppsRuntimeNetworking, LandingZoneNetworkReadsRegistry login, log-group lookup, task-definition registration and EC2, ECS and load-balancer Describe calls have no resource.
AllowAppsRuntimeStoppedTaskReadsApplies to tasks in agniworks-apps-* clusters only, through a condition, because the tasks don't exist in advance.
AllowAgniworksNetworkRetagApplies only to network resources already tagged AgniworksManagedBy=Agniworks, through a condition.
AllowLakeFormationServiceLinkedRoleBootstrap, AllowAppsRuntimeServiceLinkedRoleBootstrap, CreateLakeFormationServiceLinkedRoleCreates AWS's own service-linked roles for Lake Formation, ECS and Elastic Load Balancing, and only those, through a condition.
ListTableBuckets, AllowS3TablesRead, AthenaListings, GlueMetadataReads, BuildLogsThe lakehouse build's listing and read calls, and its own build logs.
AllowGlueCatalogBootstrapThe one-time catalog check described above.
AllowGlueCatalogOperations, AllowExecutionRoleKmsViaServices, AllowAgniworksSupportOperationsPart of the permissions boundary, which only caps roles; it grants nothing by itself. KMS use is further limited to calls made through Secrets Manager, S3 or Glue.

The lakehouse build role uses whole-service actions on named resources. Agniworks-CodeBuild-Role-<region> runs OpenTofu, which needs to create, read, update and delete the resources it manages, so it has s3:*, s3tables:*, glue:* and athena:*, each limited to the lakehouse's own resources: the agniworks-athena-results-<account> bucket, the agniworks-lakehouse-* table buckets, the lakehouse_* and S3 Tables catalog databases and tables, and the agniworks_* Athena workgroups. It also has an explicit Deny on reading objects from any other bucket. Only the agniworks-lakehouse-builder project in this stack can use the role, and it runs the code Agniworks pushes to agniworks-lakehouse-infrastructure, where you can read every change.

Every IAM statement

One table per policy, in template order. Statement IDs (Sid) match the templates exactly, so you can check each one in the IAM console.

Manual mode: AgniworksSecretsReadOnly

Inline policy on Agniworks-Manual-Secrets-Role-<region>.

StatementLets AgniworksLimited to
AllowAgniworksSecretReadsRead the value and description of your data-source secrets, to connect to your sources when it scans them.The ARNs you gave in SecretArnPattern.

Manual mode: AgniworksTrustValidation

StatementLets AgniworksLimited to
AllowSelfTrustPolicyValidationRead this role's own definition, to confirm its trust policy names only Agniworks before using it.This role.

Manual mode: AgniworksBedrockInvokeAccess

Only when GrantBedrockAccess=true.

StatementLets AgniworksLimited to
AllowBedrockModelDiscoveryList the Bedrock models and inference profiles available to you, so you can pick one.* (no resource exists).
AllowBedrockInvokeRun the Bedrock models you picked, in this account.Foundation models and this account's inference profiles.

AgniworksTrustDiscoveryPolicy

StatementLets AgniworksLimited to
AllowSelfTrustPolicyValidationRead the access role's own definition, to confirm its trust policy names only Agniworks.Agniworks-Access-Role-*.
AllowTrustStackDiscoveryRead this stack and its resources, to find the roles it created.Stacks named Agniworks* or agniworks*.

AgniworksTrustSecretsPolicy

StatementLets AgniworksLimited to
AllowAgniworksSecretReadsRead the credentials Agniworks stored for your data sources.Secrets named agniworks/*.
AllowAgniworksSecretCreateStore data-source credentials you enter, and the copy a data pipeline uses.Secrets named agniworks/*.
AllowAgniworksSecretVersionUpdatesUpdate a pipeline's copy when the source credential changes.Secrets named agniworks/*.
AllowAgniworksSecretDeleteDelete the secrets it created when you delete the data source.Secrets named agniworks/*.

AgniworksTrustLakehousePolicy

StatementLets AgniworksLimited to
AllowCodeCommitGitOpsPush the generated lakehouse code.The agniworks-lakehouse-infrastructure repository.
AllowLakehousePipelineStartStart the lakehouse build.agniworks-lakehouse-pipeline.
AllowLakehousePipelineMonitoringFollow the build's progress.agniworks-lakehouse-pipeline.
AllowLakehousePipelineLogReadsRead a failed build's log, to show you why.Log groups /aws/codebuild/agniworks*.
AllowGlueMetadataReadRead Glue database, table and partition definitions, to catalog your tables and detect schema changes. Never the data.* (see above).
AllowGlueCatalogManagementCreate and update the Glue catalog entries for the lakehouse's table buckets.* (see above).
AllowGlueTableSchemaReconciliationUpdate a table's schema in the Agniworks catalog database after a model changes.The agni_data_catalog database.
AllowS3TablesProvisioningCreate the lakehouse's namespaces and tables in S3 Tables, and read their metadata. No deletes.S3 Tables in this account and region.
AllowLakehouseTableBucketMetadataReadsRead lakehouse table metadata files.The agniworks-lakehouse-bronze/silver/gold-<account> buckets.
AllowS3BucketListingCheck whether an Agniworks bucket exists and what it holds.Buckets named agniworks-*.
AllowGlueArtifactBucketBootstrapCreate the private, encrypted bucket for pipeline job scripts.agniworks-glue-artifacts-<account>-<region>.
AllowGlueArtifactBucketObjectsUpload and replace pipeline job scripts.Objects in that bucket.
AllowLakeFormationDataAccessRoleReadConfirm the Lake Formation data-access role exists.AgniworksLakeFormationDataAccessRole-*.
AllowLakeFormationDataAccessRolePassHand that role to Lake Formation when registering the lakehouse storage.That role, and only to Lake Formation.
AllowAthenaExecutionRun and read the Athena queries behind Insights and Apps, and create the Agniworks workgroups.Workgroups agniworks_*; the AwsDataCatalog and lakehouse_* catalogs.
AllowEnvironmentSetupBudgetGuardrailsCreate and update a monthly AWS Budgets alert for the spend limit you set (it tracks the account's total spend).Budgets named Agniworks-*.
AllowLakeFormationDataAccessRegister the lakehouse storage with Lake Formation and grant the Agniworks roles access to the lakehouse tables.* (see above).
AllowLakeFormationServiceLinkedRoleBootstrapCreate Lake Formation's service-linked role the first time it's needed.Lake Formation's role only.
AllowAthenaResultsBucketAccessWrite and read Athena query results.agniworks-athena-results-<account>.
ExplicitDenyS3DataEgressDeny: read objects from any bucket except the Agniworks buckets.Everything except the seven Agniworks buckets listed in the template.

AgniworksExecutionRolePermissionBoundary

The permissions boundary on every role Agniworks creates (Glue job roles and Apps roles). A role's effective permissions are the overlap of its own policies and this boundary, so these statements cap; they grant nothing by themselves.

StatementCaps roles atLimited to
AllowGlueCatalogOperationsReading Glue definitions and writing table and partition definitions, which a pipeline job needs.* (see above).
AllowAthenaQueryExecutionRunning and reading Athena queries.Workgroups agniworks_*.
AllowLakeFormationVendedCredentialsTemporary credentials Lake Formation issues for tables it allows.* (see above).
AllowLakehouseS3TablesDataAccessReading and writing lakehouse table data. No deletes.The three agniworks-lakehouse-* table buckets.
AllowAgniworksS3AccessReading and writing objects.Buckets named agniworks-*.
AllowExecutionRoleSecretReadsReading Agniworks secrets.Secrets named agniworks/*.
AllowExecutionRoleTaggedSecretReadsReading a secret of yours that you've opted in.Secrets you tag AgniworksAccess=allowed.
AllowExecutionRoleKmsViaServicesDecrypting through Secrets Manager, S3 or Glue.Only calls made through those services.
AllowAgniworksSupportOperationsWriting logs, pulling and pushing container images, and the network interfaces a Glue job uses.* (see above).
DenyIAMEscalationDeny: every IAM change (creating users, roles, keys or policies, attaching policies, passing roles) and assuming other roles.Everything.
DenyS3DataEgressDeny: reading objects from any bucket except the Agniworks buckets.Everything except the Agniworks buckets.

AgniworksTrustPipelineOrchestrationPolicy

StatementLets AgniworksLimited to
AllowGluePipelineJobLifecycleCreate the Glue jobs that move data between lakehouse layers.Jobs named agniworks_*.
AllowGluePipelineJobOperationsRead, update, run, stop, tag and delete those jobs.Jobs named agniworks_*.
AllowGluePipelineWorkflowOrchestrationCreate and run the workflows and triggers that order the jobs.Workflows and triggers named agniworks_*.
AllowGluePipelineRoleInspectAndConfigureCheck whether the Glue job role exists.AgniworksGlueServiceRole-*.
AllowGluePipelineRoleInlinePolicyWithBoundarySet the Glue job role's permissions.AgniworksGlueServiceRole-*, and only while it carries the boundary.
AllowGluePipelineRoleCreationCreate the Glue job role.AgniworksGlueServiceRole-*, and only with the boundary attached.
AllowGluePipelineManagedPolicyAttachmentAttach AWS's AWSGlueServiceRole policy to it.That role and that one policy, only while it carries the boundary.
AllowGluePipelinePassRoleHand the job role to Glue.That role, and only to Glue.
AllowPipelineScheduleManagementCreate, change and delete the pipeline schedules you set.Schedules named agniworks_sch_*.
AllowPipelineSchedulePassRoleHand the scheduler role to EventBridge Scheduler.AgniworksSchedulerRole-<region>, and only to the scheduler.

AgniworksTrustAppsRuntimePolicy

Used only if your plan includes Apps.

StatementLets AgniworksLimited to
AllowAppsRuntimeBucketsCreate the private, encrypted buckets for app builds and app query results.agniworks-apps-artifacts-<account>-<region> and agniworks-apps-athena-results-<account>-<region>.
AllowAppsRuntimeResultsLifecycleExpire short-lived app sign-in markers in the results bucket.The apps results bucket.
AllowAppsRuntimeBucketObjectsRead and write build files and query results.Objects in those two buckets.
AllowAppsRuntimeEcrLoginSign in to your container registry.* (no resource exists).
AllowAppsRuntimeEcrCreate the apps image repository and publish app images to it.The agniworks/apps-runtime repository.
AllowAppsRuntimeCodeBuildCreateCreate and update the CodeBuild project that builds an app.Projects named agniworks-*.
AllowAppsRuntimeCodeBuildOperationsStart and follow app builds.Projects named agniworks-*.
AllowAppsRuntimeLogGroupLookupCheck whether the apps log group exists.* (no resource exists).
AllowAppsRuntimeLogsCreate the apps log group and keep logs 14 days.Log groups /agniworks/apps/*.
AllowAppsRuntimeIamRoleInspectAndConfigureCheck the Apps roles exist and keep their trust policies current.AgniworksAppsExecutionRole-*, AgniworksAppsTaskRole-*, AgniworksAppsCodeBuildRole-*.
AllowAppsRuntimeIamRoleInlinePolicyWithBoundarySet those roles' permissions.Those roles, and only while they carry the boundary.
AllowAppsRuntimeIamRoleCreationCreate those roles.Those roles, and only with the boundary attached.
AllowAppsRuntimeManagedPolicyAttachmentAttach AWS's AmazonECSTaskExecutionRolePolicy to the app execution role.That role and that one policy, only while it carries the boundary.
AllowAppsRuntimePassRoleHand those roles to ECS and CodeBuild.Those roles, and only to ECS tasks and CodeBuild.
AllowAppsRuntimeEcsAndAlbReadsRead ECS clusters, services and load balancers, and register task definitions.* (see above).
AllowAppsRuntimeEcsManagementCreate the apps cluster and run, update and remove each app's service.Clusters agniworks-apps-* and their agniworks-app-* services.
AllowAppsRuntimeStoppedTaskReadsRead why an app's task stopped, to show you the error.Tasks in agniworks-apps-* clusters.
DenyExecutionRoleBoundaryChangesDeny: removing or replacing the permissions boundary on any role Agniworks created.The Glue job and Apps roles.
AllowAppsRuntimeServiceLinkedRoleBootstrapCreate the ECS and Elastic Load Balancing service-linked roles the first time they're needed.Those two roles only.

AgniworksTrustAppsNetworkPolicy

Used for the network Agniworks sets up and for Apps.

StatementLets AgniworksLimited to
AllowAppsRuntimeAlbManagementCreate the apps load balancer, its listeners, rules and target groups.Load balancers agniapp-alb-* and target groups agniapp-*.
AllowAppsRuntimeNetworkingRead VPCs, subnets, gateways, route tables and security groups.* (see above).
AllowAgniworksNetworkCreationCreate a VPC, subnets, an internet gateway, route tables and security groups.Only resources tagged AgniworksManagedBy=Agniworks as they're created.
AllowAgniworksNetworkParentResourcesCreate subnets, route tables and security groups inside a VPC, and add security-group rules.VPCs and security-group rules.
AllowAgniworksNetworkManagementConfigure and connect those network resources.Only resources tagged AgniworksManagedBy=Agniworks.
AllowAgniworksNetworkTagOnCreateTag network resources as they're created.Only within those five create calls.
AllowAgniworksNetworkRetagRefresh tags on Agniworks network resources.Only resources tagged AgniworksManagedBy=Agniworks.

AgniworksBedrockInvokePolicy

Only when GrantBedrockAccess=true.

StatementLets AgniworksLimited to
AllowBedrockModelDiscoveryList the Bedrock models and inference profiles available to you.* (no resource exists).
AllowBedrockInvokeRun the Bedrock models you picked, in this account.Foundation models and this account's inference profiles.

AgniworksBedrockDenyPolicy

Only when GrantBedrockAccess=false.

StatementLets AgniworksLimited to
DenyAllBedrockDeny: every Bedrock action.Everything.

PipelineArtifactBucketPolicy

Bucket policy on agniworks-lakehouse-pipeline-artifactbucket-<account>.

StatementEffect for everyoneLimited to
DenyInsecureTransportDeny: any request not made over HTTPS.That bucket.

AgniDataCatalogAccessPolicy

Attached to the access role as AgniworksDataCatalog-<region>.

StatementLets AgniworksLimited to
AllowAgniDataCatalogWritePublish the tables Agniworks catalogs into one Glue database, so you can find them in the Glue console and Athena.The agni_data_catalog database.

Scheduler role: AgniworksSchedulerStartWorkflow

Inline policy on AgniworksSchedulerRole-<region>.

StatementLets EventBridge SchedulerLimited to
StartAgniworksWorkflowsStart a pipeline workflow on its schedule.Workflows named agniworks_*.

Lakehouse build role: AgniworksInfrastructureProvisioningPolicy

Inline policy on Agniworks-CodeBuild-Role-<region>, which only the agniworks-lakehouse-builder project uses.

StatementLets the buildLimited to
BuildLogsWrite its build logs.* (see above).
PipelineArtifactsRead and write pipeline artifacts.Objects in the pipeline artifact bucket.
TofuStateBucketFind its OpenTofu state.The pipeline artifact bucket.
AthenaResultsBucketCreate and manage the Athena results bucket.agniworks-athena-results-<account>.
LakehouseTableBucketsCreate and manage the lakehouse table buckets.Table buckets agniworks-lakehouse-*.
ListTableBucketsList table buckets.* (no resource exists).
GlueMetadataReadsRead Glue definitions.* (see above).
LakehouseGlueCatalogCreate and manage the lakehouse's Glue catalogs, databases and tables.The account catalog, the S3 Tables catalogs, and lakehouse_* databases and tables.
LakehouseAthenaCreate and manage the Agniworks Athena workgroups and lakehouse catalogs.Workgroups agniworks_*, catalogs lakehouse_*.
AthenaListingsList Athena resources.* (no resource exists).
LakeFormationAdministrationRegister the lakehouse storage and grant the Agniworks roles access to it.* (Lake Formation has no resource-level permissions).
PassLakeFormationDataAccessRoleHand the data-access role to Lake Formation.AgniworksLakeFormationDataAccessRole-<region>, only to Lake Formation.
LandingZoneNetworkReadsRead VPCs and subnets.* (no resource exists).
DenyS3DataEgressDeny: reading objects from any bucket except the Agniworks buckets.Everything except the Agniworks buckets.
ReadLakeFormationDataAccessRoleConfirm the data-access role exists.AgniworksLakeFormationDataAccessRole-*.
CreateLakeFormationServiceLinkedRoleCreate Lake Formation's service-linked role if it's missing.Lake Formation's role only.

Pipeline role: AgniworksPipelinePolicy

Inline policy on <stack>-CodePipelineServiceRole-<id>.

StatementLets the pipelineLimited to
PipelineArtifactsRead and write pipeline artifacts.Objects in the pipeline artifact bucket.
ReadSourceRepositoryRead the lakehouse code.The agniworks-lakehouse-infrastructure repository.
RunLakehouseBuildStart and follow the build.The agniworks-lakehouse-builder project.

Lake Formation administrators function: AgniworksLakeFormationAdminsBootstrapPolicy

Only when ManageLakeFormationAdmins=true.

StatementLets the functionLimited to
AllowLakeFormationAdminsMergeRead the Lake Formation administrators list and add the Agniworks roles to it.* (Lake Formation has no resource-level permissions).

S3 Tables catalog function: AgniworksS3TablesCatalogBootstrapPolicy

StatementLets the functionLimited to
AllowGlueCatalogBootstrapCheck for the S3 Tables catalog in Glue, and create it if the account has none. Never delete it.* (see above).
AllowLakeFormationBootstrapRegister the S3 Tables storage and grant the Agniworks roles permission in that catalog.* (Lake Formation has no resource-level permissions).
AllowS3TablesReadRead table bucket details.* (no resource exists).
AllowPassLakeFormationDataAccessRoleHand the data-access role to Lake Formation.AgniworksLakeFormationDataAccessRole-<region>, only to Lake Formation.

Removing Agniworks

Deleting or resetting your Agniworks workspace doesn't remove anything from your AWS account. Agniworks removes resources only as part of a feature: a data source's secrets when you delete it, an app's service and load-balancer rule when you delete the app, pipeline jobs and schedules a change makes unnecessary, and catalog entries in agni_data_catalog for sources you remove.

To remove everything, in this order (Agniworks support can walk you through it):

  1. In Agniworks, delete your published apps.
  2. Remove what Agniworks created (the lists above):
    • ECS services, then the agniworks-apps-* cluster and task definitions; the agniapp-alb-* load balancer and agniapp-* target groups; the agniworks-apps-* security groups; the agniworks/apps-runtime repository; the agniworks-apps-build-* project;
    • the agniworks_sch_* schedule, the agniworks_* Glue workflow, triggers and jobs;
    • the IAM roles AgniworksGlueServiceRole-* and AgniworksApps*Role-*;
    • the S3 buckets agniworks-athena-results-*, agniworks-glue-artifacts-* and agniworks-apps-* (empty each first); the tables and namespaces in the agniworks-lakehouse-* table buckets, then the table buckets;
    • the Glue databases lakehouse_* and agni_data_catalog; the Athena data catalogs lakehouse_* and the agniworks_* workgroups;
    • the Agniworks-*-Monthly-Budget budget, the agniworks/ secrets, the /agniworks/apps/* and Agniworks build and Glue log groups;
    • in a new account, the agniworks-landing-zone-* VPC, subnets, internet gateway and route table.
  3. Lake Formation: remove Agniworks-Access-Role-<region>, Agniworks-CodeBuild-Role-<region> and AgniworksS3TablesCatalogBootstrap-<region> from your administrators. Deregister the S3 Tables location (bucket/*) and delete the s3tablescatalog catalog only if nothing else in the account uses S3 Tables with Lake Formation.
  4. Delete the stack. Empty agniworks-lakehouse-pipeline-artifactbucket-<account> first, including old object versions, or CloudFormation can't delete it. Deleting the stack removes every role, policy, repository, pipeline, project and function it created. Its two setup functions deliberately leave the S3 Tables catalog and Lake Formation administrators as they are, which is why step 3 comes first.
Also in TrustData handlingWhat data Agniworks collects, where it's stored, how it's used and shared, how long it's kept, and how it's backed up.