Managing AWS Permissions
Guardrails integrates with AWS IAM to provide a flexible model for managing access to your AWS accounts. Guardrails can create and manage IAM roles, users, groups, and policies that map Guardrails permission grants to AWS access.
Permission Modes
Set the AWS > Turbot > Permissions policy to control how Guardrails manages AWS permissions:
| Mode | Policy Value | Permissions UI | AWS Login via Guardrails | Managed Policies | Managed Roles | Managed Users |
|---|---|---|---|---|---|---|
| None | Enforce: None | |||||
| Policy-Only | Enforce: Policy-Only Mode | x | ||||
| Role Mode | Enforce: Role Mode | x | x | x | x | |
| User Mode | Enforce: User Mode | x | x | x | x | x |
None: Guardrails does not manage any IAM resources. Existing Guardrails-managed IAM resources are removed. No lockdown or boundary policies are created.
Policy-Only Mode: Guardrails manages IAM policies for lockdown and boundary enforcement, but does not create roles, users, or groups. No ability to assign permissions in the Guardrails console. This is the minimum mode required for lockdown policies.
Role Mode (recommended): Guardrails creates IAM roles and policies in each account. Users assume roles via federation. Full permission management capabilities.
User Mode: Includes all the capabilities of Role Mode, plus Guardrails creates IAM users and groups. See User Mode for details specific to this mode.
resource "turbot_policy_setting" "aws_permissions" {
resource = "id-of-account-or-folder"
type = "tmod:@turbot/aws-iam#/policy/types/permissions"
value = "Enforce: Role Mode"
}
Standard Levels
The Permissions > Levels policies configure which standard Guardrails roles/groups/policies are created. Levels enabled in this policy appear in the UI and can be assigned to users:
| Level | Description |
|---|---|
| User | Basic access to the Guardrails console. No AWS access. |
| Metadata | Read-only access to resource metadata (tags, descriptions). |
| ReadOnly | Read access to all resource data. |
| Operator | Operational permissions (start/stop instances, etc.) but not create/delete. |
| Admin | Create, modify, and delete resources. |
| Owner | Full administrative access including IAM management. |
| SuperUser | Unrestricted access. Use sparingly. Not applicable on individual services. |
Account-level permission levels (AWS/Admin, AWS/Metadata, etc.) are configured in AWS > Permissions > Levels. By default, all levels are enabled.
Service-level permission levels (AWS/S3/Admin, AWS/EC2/Operator, etc.) are configured in AWS > {Service} > Permissions > Levels. Use AWS > Permissions > Levels [Default] to set the default for all services. By default, service-level permissions are not enabled.
Example use cases:
- Disable the
AWS/Userpermission level if your organization doesn't use it, so it doesn't appear on the Guardrails Permissions page. - Only assign access using account-level permissions (
AWS/*), and skip the overhead of service-specific permission levels.
Modifiers
Permission Level Modifiers let you customize the standard permissions that Guardrails generates. Modifiers work with the Guardrails IAM rules engine to modify access directly in the Guardrails-managed IAM policies.
Use modifiers to:
- Add access to a new AWS API that Guardrails hasn't added yet.
- Move a capability from one level to another (e.g., allow Operators to do something normally reserved for Admins).
- Remove a permission from a level you consider too privileged.
How Modifiers Work
Modifiers are cumulative in the same way that levels are. If you add a permission to the Metadata level, it's also added to ReadOnly, Operator, and Admin.
Modifier policies exist at both the AWS (account) level and per-service level:
- Account-level modifiers (
AWS > Turbot > Permissions > Levels > Modifiers) apply only at the AWS level. - Service-level modifiers (
AWS > {Service} > Permissions > Levels > Modifiers) roll up to the account level too. For example, addingglacier:CreateVaultto S3/Operator also assigns it to AWS/Operator.
[!NOTE] If multiple service-level policies assign an operation to different levels, the operation is assigned at the lower permission level in the account permissions. For example, if
S3:CreateBucketis S3/Operator and ElasticBeanstalk/User, it becomes AWS/User.
[!NOTE] If an operation is set to None in one service-level modifier but another service has it defined at that level, it is NOT removed at the AWS level.
Override priority:
- Guardrails defaults (built-in)
- Capability Modifier Policies (override defaults)
- Custom Modifiers (override capability modifiers)
Modifier Policy Format
The modifier policy takes an array of permission: level assignments:
- "ec2:DescribeInstance": "admin"
- "s3:PutObject": "admin"
resource "turbot_policy_setting" "aws_permissions_modifiers" {
resource = "id-of-account-or-folder"
type = "tmod:@turbot/aws-iam#/policy/types/permissionsLevelsModifiers"
value = jsonencode([
{ "s3:PutObject" : "admin" },
{ "ec2:DescribeInstance" : "admin" }
])
}
Capability Modifier Policies
Capability Modifiers are pre-defined modifiers provided by Guardrails. They're commonly used to force administration of resources through the Guardrails control plane and disallow direct access to underlying AWS APIs.
Examples:
AWS > S3 > Permissions > Levels > ACL AdministrationAWS > S3 > Permissions > Levels > Access Logging Administration
Capability Modifier Policies are applied after the built-in permissions but before custom Modifiers, so custom Modifiers can override them.
Custom Role Levels
Custom Role Levels let you map your existing IAM roles to Guardrails permission levels. The custom roles appear in the UI as grantable permissions, named AWS/Role/{RoleName}.
Use cases:
- Leverage existing IAM roles instead of (or in addition to) Guardrails standard roles.
- Manage access at sub-account granularity with custom roles.
- Support multiple categories of users in an account, each needing different access.
Setup
Specify custom roles as YAML lists in the AWS > Turbot > Permissions > Custom Levels [Account] or Custom Levels [Folder] policies. Use [Account] for roles in a single account, [Folder] for roles that exist across multiple accounts.
The assume role policy on each custom role must allow the Guardrails IAM role to assume it:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::{account_id}:role/{turbot_iam_role}"
},
"Action": "sts:AssumeRole"
}
]
}
The assume role chain is: Turbot Master Account → Guardrails IAM Role → Custom Role. This is role chaining, which AWS limits to a maximum 1-hour session duration.
Troubleshooting Custom Roles
- Verify
AWS > Turbot > Permissionsis at leastEnforce: Role Mode. - Verify the Guardrails IAM role has permission to assume the custom role.
- Verify the custom role exists in the account and has a CMDB entry in Guardrails.
- Verify spelling in the
Custom Levelspolicy. Use the role name, not the full ARN. - For
Custom Levels [Account], the role only appears in the Grant Permission dialog when the resource scope is that account. UseCustom Levels [Folder]to make roles appear at folder level. - Verify the end user has a profile in Guardrails (created on first login or via Terraform).
- If Guardrails shows an error assuming the custom role, check the assume role policy on the custom role.
Lockdown and Boundary Policies
Guardrails uses IAM policies to enforce restrictions on both Guardrails-managed and customer-managed users and roles. There are two mechanisms:
Boundary Policies (Hard Limits)
Boundary policies set the maximum permissions a user can have using AWS permissions boundaries. They create a hard ceiling. If a service or region is not in the boundary, there is no access at all, even for Guardrails or SuperUser.
- Always applied to Guardrails-managed roles and users.
- Set to
Skipby default for customer-managed users and roles. To enforce on customer-managed IAM, setAWS > IAM > Role > BoundaryandAWS > IAM > User > BoundarytoEnforce. - More restrictive than lockdown: services disabled in the boundary are disabled entirely with no exceptions for specific APIs.
Lockdown Policies (Soft Restrictions)
Lockdown policies add explicit deny statements to IAM policies. They're more granular than boundary policies and support Metadata Only in addition to Enabled/Disabled.
- Applied to Guardrails-managed users and roles by default.
- NOT applied to customer-managed users/roles by default. To enforce, set
AWS > IAM > Role > Policy Attachments > RequiredandRequired > Turbot LockdowntoEnabled. - NOT applied to the Guardrails IAM role or SuperUser.
Configuration Policies
| Purpose | Boundary (Hard) | Lockdown (Soft) |
|---|---|---|
| Enable/Disable Regions | AWS > Turbot > Permissions > Lockdown > Region Boundary | AWS > Turbot > Permissions > Lockdown > Regions |
| Enable/Disable Services | AWS > {Service} > API Enabled | AWS > {Service} > Enabled |
| Enforce on Customer IAM | AWS > IAM > Role > Boundary / AWS > IAM > User > Boundary | AWS > IAM > Role > Policy Attachments > Required > Turbot Lockdown / AWS > IAM > User > Policy Attachments > Required > Turbot Lockdown |
| SuperUser Boundary | AWS > Turbot > Permissions > Superuser Boundary | N/A (lockdown never applies to SuperUser) |
[!IMPORTANT] For lockdown and boundary policies to be in effect, you must have the
aws-iammod installed, the IAM service enabled (AWS > IAM > Enabled), andAWS > Turbot > Permissionsset to at least Policy-Only Mode.
Common Scenarios
Restrict to specific regions but allow Guardrails/SuperUser to access all regions:
- Leave
Region Boundaryat the default ([*]) - Set
AWS > Turbot > Permissions > Lockdown > Regionsto your approved region list
Hard-restrict to specific regions (nobody can access others, including Guardrails):
- Set
AWS > Turbot > Permissions > Lockdown > Region Boundaryto only the allowed regions
Disable a service for users but allow Guardrails/SuperUser to use it:
- Set
AWS > {Service} > EnabledtoDisabled - Set
AWS > {Service} > API EnabledtoEnabled
Disable a service completely (nobody, including Guardrails):
- Set
AWS > {Service} > EnabledtoDisabled - Set
AWS > {Service} > API EnabledtoDisabled(or leave at defaultEnabled if {Service} > Enabled)
Enforce lockdown policies on ALL roles (including customer-managed):
- Set
AWS > IAM > Role > Policy Attachments > RequiredtoEnforce: Required > Items - Set
AWS > IAM > Role > Policy Attachments > Required > Turbot LockdowntoEnabled - Same for Users:
AWS > IAM > User > Policy Attachments > RequiredandRequired > Turbot Lockdown
Exempt the Guardrails role from boundary enforcement:
- Set
AWS > IAM > Role > BoundarytoEnforce: No Boundaryon the Guardrails IAM role
Exempt SuperUser from boundary enforcement:
- Set
AWS > Turbot > Permissions > Superuser BoundarytoNo boundary
Use your own boundary policy instead of the Guardrails-managed one:
- Set
AWS > IAM > User > Boundary > PolicyandAWS > IAM > Role > Boundary > Policyto the name of your policy. Note that Guardrails'Region BoundaryandAPI Enabledpolicies have no effect if you don't use the Guardrails boundary policy.
Allow permissions for a service Guardrails doesn't support:
- Add the APIs to
AWS > Turbot > Permissions > Lockdown > API Boundary(allows in both boundary and lockdown) - Use Custom Roles or Custom Group Levels to grant access
Name Prefix and Paths
Customize the naming and IAM paths for Guardrails-managed resources:
| Policy | Description |
|---|---|
AWS > Turbot > Permissions > Name Prefix [Default] | Global prefix for all Guardrails-managed IAM resources. |
AWS > Turbot > Permissions > Group > Name Prefix | Prefix for IAM group names. |
AWS > Turbot > Permissions > Policy > Name Prefix | Prefix for IAM policy names. |
AWS > Turbot > Permissions > Role > Name Prefix | Prefix for IAM role names. |
AWS > Turbot > Permissions > Name Path [Default] | Global IAM path for all Guardrails-managed IAM resources. |
Troubleshooting
| Issue | Solution |
|---|---|
| Users can't access expected services | Check lockdown policies aren't restricting the service. Verify the service is Enabled. Verify the user has the correct permission level. |
| Boundary policy errors | Ensure the boundary policy doesn't conflict with the user's required actions. Check if the service is in the API boundary. |
| IAM resources not being created | Verify AWS > Turbot > Permissions is set to Enforce: Role Mode or Enforce: User Mode, not Skip or None. |
| Custom role not appearing in Grant dialog | Verify the role exists in the account, spelling matches, and the policy is set at the correct scope ([Account] vs [Folder]). |
| Further assistance | Open a Support Ticket |