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:
| Mode | Template | What Agniworks can do |
|---|---|---|
| Manual | agniworks-manual-trust.yaml | Read 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 Automation | agniworks-trust-role.yaml | Build 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 (
GetObjectand 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 theagniworks-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 tagAgniworksAccess=allowedfor 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
AgniworksExecutionRolePermissionBoundarypermissions 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
Agniworksoragniworks. - 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.
| Parameter | What it's for |
|---|---|
AgniPrincipalArn | The Agniworks control-plane role allowed to assume this role. |
ExternalId | The secret your workspace presents when assuming the role (prevents the "confused deputy" problem). |
SecretArnPattern | Required. 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. |
GrantBedrockAccess | true 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. |
AgniAccountId | The 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.
| Parameter | What it's for |
|---|---|
AgniPrincipalArn, ExternalId, AgniAccountId | As for the Manual template. |
GrantBedrockAccess | true attaches Bedrock discovery and invocation; false attaches an explicit Deny on all of Bedrock. |
ManageLakeFormationAdmins | true 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):
| Resource | Name | Why |
|---|---|---|
| IAM role | Agniworks-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 policies | AgniworksTrustDiscoveryPolicy, AgniworksTrustSecretsPolicy, AgniworksTrustLakehousePolicy, AgniworksTrustPipelineOrchestrationPolicy, AgniworksTrustAppsRuntimePolicy, AgniworksTrustAppsNetworkPolicy, AgniworksDataCatalog-<region>, and one Bedrock policy | The access role's permissions, split by feature. CloudFormation prefixes the first six with the stack name. |
| IAM managed policy | AgniworksExecutionRolePermissionBoundary | Not attached to anything at creation. It's the permissions boundary every role Agniworks creates later must carry. |
| IAM role | Agniworks-CodeBuild-Role-<region> | Runs the lakehouse build (AgniworksInfrastructureProvisioningPolicy). |
| IAM role | <stack>-CodePipelineServiceRole-<id> | Lets the pipeline move the build's source and artifacts. |
| IAM role | AgniworksLakeFormationDataAccessRole-<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 role | AgniworksSchedulerRole-<region> | Assumed only by EventBridge Scheduler in this account, to start agniworks_* Glue workflows on the schedules you set. |
| CodeCommit repository | agniworks-lakehouse-infrastructure | Holds the generated OpenTofu (Terraform-compatible) code for your lakehouse. You can read every change Agniworks makes. |
| CodePipeline pipeline | agniworks-lakehouse-pipeline | Runs the build when Agniworks pushes a change. |
| CodeBuild project | agniworks-lakehouse-builder | Installs a pinned, checksum-verified OpenTofu release and applies the code. |
| S3 bucket | agniworks-lakehouse-pipeline-artifactbucket-<account> | Pipeline artifacts and the OpenTofu state. Private, encrypted, versioned (old versions expire after 90 days), HTTPS-only. |
| Lambda function and role | AgniworksS3TablesCatalogBootstrap-<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 role | AgniworksLakeFormationAdminsBootstrap-<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
s3tablescatalogcatalog, 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)
| Resource | Name | Notes |
|---|---|---|
| VPC, 2 subnets, internet gateway, route table | agniworks-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 budget | Agniworks-<id>-Monthly-Budget | A 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 database | agni_data_catalog | Where 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 administrators | Adds 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.
| Resource | Name | Notes |
|---|---|---|
| S3 table buckets | agniworks-lakehouse-bronze-<account>, -silver-, -gold- | Encrypted. |
| Namespaces | tenant_<workspace id> | One in each table bucket. |
| Tables | One per approved model table | Agniworks adds or changes columns when a model changes. It never drops a table. |
| Glue databases | lakehouse_bronze, lakehouse_silver, lakehouse_gold | |
| Athena data catalogs | lakehouse_bronze, lakehouse_silver, lakehouse_gold | Point Athena at the table buckets. |
| S3 bucket | agniworks-athena-results-<account> | Athena query results. Objects expire after 7 days. |
| Athena workgroup | agniworks_workgroup | |
| Lake Formation registration and grants | All S3 table buckets (bucket/*); the s3tablescatalog catalog, created or updated to allow full-table access from Athena and Glue | Grants go to the Agniworks roles, on the lakehouse namespaces. |
Data pipelines
| Resource | Name | Notes |
|---|---|---|
| S3 bucket | agniworks-glue-artifacts-<account>-<region> | Pipeline job scripts, Glue temporary files and Insight results. Private and encrypted; objects don't expire. |
| IAM role | AgniworksGlueServiceRole-<id>-<region> | Runs the jobs. Carries the permissions boundary, AWS's AWSGlueServiceRole policy, and an Agniworks policy for the lakehouse and Agniworks buckets. |
| Glue jobs | agniworks_<id>_<layer>_<table> | Glue 5.0, 2 G.1X workers, 2-hour timeout. Agniworks deletes jobs a redeploy no longer needs. |
| Glue workflow and triggers | agniworks_wf_<id>, agniworks_od_<id>, <job>_trg | Run the jobs in order. Removed when no jobs remain. |
| EventBridge Scheduler schedule | agniworks_sch_<id> | Only if you schedule pipelines. Removed when you turn the schedule off. |
| Secrets | agniworks/<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)
| Resource | Name | Notes |
|---|---|---|
| S3 buckets | agniworks-apps-artifacts-<account>-<region>, agniworks-apps-athena-results-<account>-<region> | App builds, and the apps' query results. Query results don't expire. |
| Athena workgroup | agniworks_apps_workgroup | Encryption enforced; each query can scan at most 10 GB. |
| IAM roles | AgniworksAppsExecutionRole-<id>-<region>, AgniworksAppsTaskRole-…, AgniworksAppsCodeBuildRole-… | Each carries the permissions boundary. |
| CodeBuild project | agniworks-apps-build-<id> | Builds app images with Docker (privileged mode), from a Python base image on Amazon ECR Public and packages from PyPI. |
| ECR repository | agniworks/apps-runtime | Scans images on push. |
| ECS cluster, services and task definitions | agniworks-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, rules | agniapp-alb-<id>, agniapp-<…> | Internet-facing, HTTP on port 80. Each app is a path rule, removed when you delete the app. |
| Security groups | agniworks-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.
| Statement | Why it can't be narrower |
|---|---|
AllowGlueMetadataRead | Reads 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. |
AllowGlueCatalogManagement | Creates and updates the federated Glue catalog entries for the lakehouse's S3 table buckets. |
AllowLakeFormationDataAccess, AllowLakeFormationAdminsMerge, AllowLakeFormationBootstrap, LakeFormationAdministration, AllowLakeFormationVendedCredentials | Lake 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. |
AllowBedrockModelDiscovery | Listing Bedrock models and inference profiles has no resource. |
AllowAppsRuntimeEcrLogin, AllowAppsRuntimeLogGroupLookup, AllowAppsRuntimeEcsAndAlbReads, AllowAppsRuntimeNetworking, LandingZoneNetworkReads | Registry login, log-group lookup, task-definition registration and EC2, ECS and load-balancer Describe calls have no resource. |
AllowAppsRuntimeStoppedTaskReads | Applies to tasks in agniworks-apps-* clusters only, through a condition, because the tasks don't exist in advance. |
AllowAgniworksNetworkRetag | Applies only to network resources already tagged AgniworksManagedBy=Agniworks, through a condition. |
AllowLakeFormationServiceLinkedRoleBootstrap, AllowAppsRuntimeServiceLinkedRoleBootstrap, CreateLakeFormationServiceLinkedRole | Creates AWS's own service-linked roles for Lake Formation, ECS and Elastic Load Balancing, and only those, through a condition. |
ListTableBuckets, AllowS3TablesRead, AthenaListings, GlueMetadataReads, BuildLogs | The lakehouse build's listing and read calls, and its own build logs. |
AllowGlueCatalogBootstrap | The one-time catalog check described above. |
AllowGlueCatalogOperations, AllowExecutionRoleKmsViaServices, AllowAgniworksSupportOperations | Part 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>.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowAgniworksSecretReads | Read 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
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowSelfTrustPolicyValidation | Read 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.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowBedrockModelDiscovery | List the Bedrock models and inference profiles available to you, so you can pick one. | * (no resource exists). |
AllowBedrockInvoke | Run the Bedrock models you picked, in this account. | Foundation models and this account's inference profiles. |
AgniworksTrustDiscoveryPolicy
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowSelfTrustPolicyValidation | Read the access role's own definition, to confirm its trust policy names only Agniworks. | Agniworks-Access-Role-*. |
AllowTrustStackDiscovery | Read this stack and its resources, to find the roles it created. | Stacks named Agniworks* or agniworks*. |
AgniworksTrustSecretsPolicy
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowAgniworksSecretReads | Read the credentials Agniworks stored for your data sources. | Secrets named agniworks/*. |
AllowAgniworksSecretCreate | Store data-source credentials you enter, and the copy a data pipeline uses. | Secrets named agniworks/*. |
AllowAgniworksSecretVersionUpdates | Update a pipeline's copy when the source credential changes. | Secrets named agniworks/*. |
AllowAgniworksSecretDelete | Delete the secrets it created when you delete the data source. | Secrets named agniworks/*. |
AgniworksTrustLakehousePolicy
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowCodeCommitGitOps | Push the generated lakehouse code. | The agniworks-lakehouse-infrastructure repository. |
AllowLakehousePipelineStart | Start the lakehouse build. | agniworks-lakehouse-pipeline. |
AllowLakehousePipelineMonitoring | Follow the build's progress. | agniworks-lakehouse-pipeline. |
AllowLakehousePipelineLogReads | Read a failed build's log, to show you why. | Log groups /aws/codebuild/agniworks*. |
AllowGlueMetadataRead | Read Glue database, table and partition definitions, to catalog your tables and detect schema changes. Never the data. | * (see above). |
AllowGlueCatalogManagement | Create and update the Glue catalog entries for the lakehouse's table buckets. | * (see above). |
AllowGlueTableSchemaReconciliation | Update a table's schema in the Agniworks catalog database after a model changes. | The agni_data_catalog database. |
AllowS3TablesProvisioning | Create the lakehouse's namespaces and tables in S3 Tables, and read their metadata. No deletes. | S3 Tables in this account and region. |
AllowLakehouseTableBucketMetadataReads | Read lakehouse table metadata files. | The agniworks-lakehouse-bronze/silver/gold-<account> buckets. |
AllowS3BucketListing | Check whether an Agniworks bucket exists and what it holds. | Buckets named agniworks-*. |
AllowGlueArtifactBucketBootstrap | Create the private, encrypted bucket for pipeline job scripts. | agniworks-glue-artifacts-<account>-<region>. |
AllowGlueArtifactBucketObjects | Upload and replace pipeline job scripts. | Objects in that bucket. |
AllowLakeFormationDataAccessRoleRead | Confirm the Lake Formation data-access role exists. | AgniworksLakeFormationDataAccessRole-*. |
AllowLakeFormationDataAccessRolePass | Hand that role to Lake Formation when registering the lakehouse storage. | That role, and only to Lake Formation. |
AllowAthenaExecution | Run and read the Athena queries behind Insights and Apps, and create the Agniworks workgroups. | Workgroups agniworks_*; the AwsDataCatalog and lakehouse_* catalogs. |
AllowEnvironmentSetupBudgetGuardrails | Create and update a monthly AWS Budgets alert for the spend limit you set (it tracks the account's total spend). | Budgets named Agniworks-*. |
AllowLakeFormationDataAccess | Register the lakehouse storage with Lake Formation and grant the Agniworks roles access to the lakehouse tables. | * (see above). |
AllowLakeFormationServiceLinkedRoleBootstrap | Create Lake Formation's service-linked role the first time it's needed. | Lake Formation's role only. |
AllowAthenaResultsBucketAccess | Write and read Athena query results. | agniworks-athena-results-<account>. |
ExplicitDenyS3DataEgress | Deny: 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.
| Statement | Caps roles at | Limited to |
|---|---|---|
AllowGlueCatalogOperations | Reading Glue definitions and writing table and partition definitions, which a pipeline job needs. | * (see above). |
AllowAthenaQueryExecution | Running and reading Athena queries. | Workgroups agniworks_*. |
AllowLakeFormationVendedCredentials | Temporary credentials Lake Formation issues for tables it allows. | * (see above). |
AllowLakehouseS3TablesDataAccess | Reading and writing lakehouse table data. No deletes. | The three agniworks-lakehouse-* table buckets. |
AllowAgniworksS3Access | Reading and writing objects. | Buckets named agniworks-*. |
AllowExecutionRoleSecretReads | Reading Agniworks secrets. | Secrets named agniworks/*. |
AllowExecutionRoleTaggedSecretReads | Reading a secret of yours that you've opted in. | Secrets you tag AgniworksAccess=allowed. |
AllowExecutionRoleKmsViaServices | Decrypting through Secrets Manager, S3 or Glue. | Only calls made through those services. |
AllowAgniworksSupportOperations | Writing logs, pulling and pushing container images, and the network interfaces a Glue job uses. | * (see above). |
DenyIAMEscalation | Deny: every IAM change (creating users, roles, keys or policies, attaching policies, passing roles) and assuming other roles. | Everything. |
DenyS3DataEgress | Deny: reading objects from any bucket except the Agniworks buckets. | Everything except the Agniworks buckets. |
AgniworksTrustPipelineOrchestrationPolicy
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowGluePipelineJobLifecycle | Create the Glue jobs that move data between lakehouse layers. | Jobs named agniworks_*. |
AllowGluePipelineJobOperations | Read, update, run, stop, tag and delete those jobs. | Jobs named agniworks_*. |
AllowGluePipelineWorkflowOrchestration | Create and run the workflows and triggers that order the jobs. | Workflows and triggers named agniworks_*. |
AllowGluePipelineRoleInspectAndConfigure | Check whether the Glue job role exists. | AgniworksGlueServiceRole-*. |
AllowGluePipelineRoleInlinePolicyWithBoundary | Set the Glue job role's permissions. | AgniworksGlueServiceRole-*, and only while it carries the boundary. |
AllowGluePipelineRoleCreation | Create the Glue job role. | AgniworksGlueServiceRole-*, and only with the boundary attached. |
AllowGluePipelineManagedPolicyAttachment | Attach AWS's AWSGlueServiceRole policy to it. | That role and that one policy, only while it carries the boundary. |
AllowGluePipelinePassRole | Hand the job role to Glue. | That role, and only to Glue. |
AllowPipelineScheduleManagement | Create, change and delete the pipeline schedules you set. | Schedules named agniworks_sch_*. |
AllowPipelineSchedulePassRole | Hand the scheduler role to EventBridge Scheduler. | AgniworksSchedulerRole-<region>, and only to the scheduler. |
AgniworksTrustAppsRuntimePolicy
Used only if your plan includes Apps.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowAppsRuntimeBuckets | Create the private, encrypted buckets for app builds and app query results. | agniworks-apps-artifacts-<account>-<region> and agniworks-apps-athena-results-<account>-<region>. |
AllowAppsRuntimeResultsLifecycle | Expire short-lived app sign-in markers in the results bucket. | The apps results bucket. |
AllowAppsRuntimeBucketObjects | Read and write build files and query results. | Objects in those two buckets. |
AllowAppsRuntimeEcrLogin | Sign in to your container registry. | * (no resource exists). |
AllowAppsRuntimeEcr | Create the apps image repository and publish app images to it. | The agniworks/apps-runtime repository. |
AllowAppsRuntimeCodeBuildCreate | Create and update the CodeBuild project that builds an app. | Projects named agniworks-*. |
AllowAppsRuntimeCodeBuildOperations | Start and follow app builds. | Projects named agniworks-*. |
AllowAppsRuntimeLogGroupLookup | Check whether the apps log group exists. | * (no resource exists). |
AllowAppsRuntimeLogs | Create the apps log group and keep logs 14 days. | Log groups /agniworks/apps/*. |
AllowAppsRuntimeIamRoleInspectAndConfigure | Check the Apps roles exist and keep their trust policies current. | AgniworksAppsExecutionRole-*, AgniworksAppsTaskRole-*, AgniworksAppsCodeBuildRole-*. |
AllowAppsRuntimeIamRoleInlinePolicyWithBoundary | Set those roles' permissions. | Those roles, and only while they carry the boundary. |
AllowAppsRuntimeIamRoleCreation | Create those roles. | Those roles, and only with the boundary attached. |
AllowAppsRuntimeManagedPolicyAttachment | Attach AWS's AmazonECSTaskExecutionRolePolicy to the app execution role. | That role and that one policy, only while it carries the boundary. |
AllowAppsRuntimePassRole | Hand those roles to ECS and CodeBuild. | Those roles, and only to ECS tasks and CodeBuild. |
AllowAppsRuntimeEcsAndAlbReads | Read ECS clusters, services and load balancers, and register task definitions. | * (see above). |
AllowAppsRuntimeEcsManagement | Create the apps cluster and run, update and remove each app's service. | Clusters agniworks-apps-* and their agniworks-app-* services. |
AllowAppsRuntimeStoppedTaskReads | Read why an app's task stopped, to show you the error. | Tasks in agniworks-apps-* clusters. |
DenyExecutionRoleBoundaryChanges | Deny: removing or replacing the permissions boundary on any role Agniworks created. | The Glue job and Apps roles. |
AllowAppsRuntimeServiceLinkedRoleBootstrap | Create 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.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowAppsRuntimeAlbManagement | Create the apps load balancer, its listeners, rules and target groups. | Load balancers agniapp-alb-* and target groups agniapp-*. |
AllowAppsRuntimeNetworking | Read VPCs, subnets, gateways, route tables and security groups. | * (see above). |
AllowAgniworksNetworkCreation | Create a VPC, subnets, an internet gateway, route tables and security groups. | Only resources tagged AgniworksManagedBy=Agniworks as they're created. |
AllowAgniworksNetworkParentResources | Create subnets, route tables and security groups inside a VPC, and add security-group rules. | VPCs and security-group rules. |
AllowAgniworksNetworkManagement | Configure and connect those network resources. | Only resources tagged AgniworksManagedBy=Agniworks. |
AllowAgniworksNetworkTagOnCreate | Tag network resources as they're created. | Only within those five create calls. |
AllowAgniworksNetworkRetag | Refresh tags on Agniworks network resources. | Only resources tagged AgniworksManagedBy=Agniworks. |
AgniworksBedrockInvokePolicy
Only when GrantBedrockAccess=true.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowBedrockModelDiscovery | List the Bedrock models and inference profiles available to you. | * (no resource exists). |
AllowBedrockInvoke | Run the Bedrock models you picked, in this account. | Foundation models and this account's inference profiles. |
AgniworksBedrockDenyPolicy
Only when GrantBedrockAccess=false.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
DenyAllBedrock | Deny: every Bedrock action. | Everything. |
PipelineArtifactBucketPolicy
Bucket policy on agniworks-lakehouse-pipeline-artifactbucket-<account>.
| Statement | Effect for everyone | Limited to |
|---|---|---|
DenyInsecureTransport | Deny: any request not made over HTTPS. | That bucket. |
AgniDataCatalogAccessPolicy
Attached to the access role as AgniworksDataCatalog-<region>.
| Statement | Lets Agniworks | Limited to |
|---|---|---|
AllowAgniDataCatalogWrite | Publish 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>.
| Statement | Lets EventBridge Scheduler | Limited to |
|---|---|---|
StartAgniworksWorkflows | Start 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.
| Statement | Lets the build | Limited to |
|---|---|---|
BuildLogs | Write its build logs. | * (see above). |
PipelineArtifacts | Read and write pipeline artifacts. | Objects in the pipeline artifact bucket. |
TofuStateBucket | Find its OpenTofu state. | The pipeline artifact bucket. |
AthenaResultsBucket | Create and manage the Athena results bucket. | agniworks-athena-results-<account>. |
LakehouseTableBuckets | Create and manage the lakehouse table buckets. | Table buckets agniworks-lakehouse-*. |
ListTableBuckets | List table buckets. | * (no resource exists). |
GlueMetadataReads | Read Glue definitions. | * (see above). |
LakehouseGlueCatalog | Create and manage the lakehouse's Glue catalogs, databases and tables. | The account catalog, the S3 Tables catalogs, and lakehouse_* databases and tables. |
LakehouseAthena | Create and manage the Agniworks Athena workgroups and lakehouse catalogs. | Workgroups agniworks_*, catalogs lakehouse_*. |
AthenaListings | List Athena resources. | * (no resource exists). |
LakeFormationAdministration | Register the lakehouse storage and grant the Agniworks roles access to it. | * (Lake Formation has no resource-level permissions). |
PassLakeFormationDataAccessRole | Hand the data-access role to Lake Formation. | AgniworksLakeFormationDataAccessRole-<region>, only to Lake Formation. |
LandingZoneNetworkReads | Read VPCs and subnets. | * (no resource exists). |
DenyS3DataEgress | Deny: reading objects from any bucket except the Agniworks buckets. | Everything except the Agniworks buckets. |
ReadLakeFormationDataAccessRole | Confirm the data-access role exists. | AgniworksLakeFormationDataAccessRole-*. |
CreateLakeFormationServiceLinkedRole | Create Lake Formation's service-linked role if it's missing. | Lake Formation's role only. |
Pipeline role: AgniworksPipelinePolicy
Inline policy on <stack>-CodePipelineServiceRole-<id>.
| Statement | Lets the pipeline | Limited to |
|---|---|---|
PipelineArtifacts | Read and write pipeline artifacts. | Objects in the pipeline artifact bucket. |
ReadSourceRepository | Read the lakehouse code. | The agniworks-lakehouse-infrastructure repository. |
RunLakehouseBuild | Start and follow the build. | The agniworks-lakehouse-builder project. |
Lake Formation administrators function: AgniworksLakeFormationAdminsBootstrapPolicy
Only when ManageLakeFormationAdmins=true.
| Statement | Lets the function | Limited to |
|---|---|---|
AllowLakeFormationAdminsMerge | Read the Lake Formation administrators list and add the Agniworks roles to it. | * (Lake Formation has no resource-level permissions). |
S3 Tables catalog function: AgniworksS3TablesCatalogBootstrapPolicy
| Statement | Lets the function | Limited to |
|---|---|---|
AllowGlueCatalogBootstrap | Check for the S3 Tables catalog in Glue, and create it if the account has none. Never delete it. | * (see above). |
AllowLakeFormationBootstrap | Register the S3 Tables storage and grant the Agniworks roles permission in that catalog. | * (Lake Formation has no resource-level permissions). |
AllowS3TablesRead | Read table bucket details. | * (no resource exists). |
AllowPassLakeFormationDataAccessRole | Hand 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):
- In Agniworks, delete your published apps.
- Remove what Agniworks created (the lists above):
- ECS services, then the
agniworks-apps-*cluster and task definitions; theagniapp-alb-*load balancer andagniapp-*target groups; theagniworks-apps-*security groups; theagniworks/apps-runtimerepository; theagniworks-apps-build-*project; - the
agniworks_sch_*schedule, theagniworks_*Glue workflow, triggers and jobs; - the IAM roles
AgniworksGlueServiceRole-*andAgniworksApps*Role-*; - the S3 buckets
agniworks-athena-results-*,agniworks-glue-artifacts-*andagniworks-apps-*(empty each first); the tables and namespaces in theagniworks-lakehouse-*table buckets, then the table buckets; - the Glue databases
lakehouse_*andagni_data_catalog; the Athena data catalogslakehouse_*and theagniworks_*workgroups; - the
Agniworks-*-Monthly-Budgetbudget, theagniworks/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.
- ECS services, then the
- Lake Formation: remove
Agniworks-Access-Role-<region>,Agniworks-CodeBuild-Role-<region>andAgniworksS3TablesCatalogBootstrap-<region>from your administrators. Deregister the S3 Tables location (bucket/*) and delete thes3tablescatalogcatalog only if nothing else in the account uses S3 Tables with Lake Formation. - 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.