For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/providers/aws-permissions/index.md.

AWS permissions and resources

What AWS onboarding creates in your account, what Ringleader may do there, what your account checks and which values you hand back.

Onboarding AWS creates an IAM OIDC identity provider, an IAM role with a permission policy, and optionally a network, in an AWS account you own. This page lists those resources, the permissions the role holds and the values you send back to Ringleader. To run the setup, follow Onboard AWS.

Resources onboarding creates

Onboarding creates three things in your account, all visible in the AWS console afterwards, plus an optional fourth:

  • An IAM OIDC identity provider. This is how AWS confirms that a request really comes from Ringleader and is meant for your organization, without Ringleader ever holding an access key.
  • An IAM role called ringleader-workstations. This is the role Ringleader assumes when it creates or terminates an instance.
  • A permission policy on that role. It lets the role create, start, stop and terminate EC2 instances and read what it needs to do that. The features under Setup switches add more, and runtime identities, which are on by default, add IAM permissions.
  • Optionally, a network for the workstations: a VPC, a subnet, a NAT gateway, and two security groups. Both setup paths create it unless you turn it off (create_network = false or CREATE_NETWORK=false).

Rights and limits in your account

The base policy lets Ringleader manage EC2 instances and nothing else. The role Ringleader signs in as has no billing access and no account admin. It gets IAM permissions only from runtime identities, which are on by default and can reach the whole account, as Setup switches describes. Cloud accounts says what Ringleader gets and what it never gets. The base policy is exactly:

  • thirteen read-only ec2:Describe actions (instances, instance status, instance types, instance type offerings, images, subnets, security groups, VPCs, volumes, volume modifications, network interfaces, tags and availability zones), named one by one rather than granted as a wildcard, on * because none of these thirteen supports resource-level scoping. Ringleader reads the instance types in your region and which availability zones offer each one, so a person creating a workstation picks an instance type its availability zone offers,
  • ec2:DescribeInstanceAttribute, also on *, in a statement of its own so that it takes the same optional region bound as the actions below. It is the one read here that returns content rather than shape. Asked for the userData attribute, it returns an instance’s whole boot payload. That is how Ringleader checks that what it wrote to a workstation carries no credential,
  • ec2:RunInstances / TerminateInstances / StartInstances / StopInstances / ModifyInstanceAttribute / ModifyVolume / ModifyInstanceCpuOptions / CreateTags / DeleteTags, the instance lifecycle, growing a workstation’s root volume, turning nested virtualization on or off for an existing workstation, and tag upkeep, optionally bounded to one region with an aws:RequestedRegion condition. EC2 changes nested virtualization only on a stopped instance, so Ringleader stops the workstation, makes the change and starts it again,
  • ssm:GetParameters / GetParameter on arn:aws:ssm:*::parameter/aws/service/*, the AWS-owned public AMI parameters that an image.distribution / image.version resolves to at launch.

Setup switches

Three features are on by default and add to the base policy. Each has a switch that turns it off. Nothing else changes when you do.

FeatureWhat it addsTurn it off with
Runtime identitiesCreating, tagging and deleting IAM roles and instance profiles under one IAM path, attaching any managed policy to those roles, passing them to EC2 with iam:PassRole, listing every role and instance profile in the account, and putting an instance profile on an instanceenable_workstation_identities = false (Terraform) or the EnableWorkstationIdentities stack parameter (CloudFormation)
Egress controlSecurity-group and routing actions, listed under Egress control permissionsenable_egress_control = false (Terraform) or EGRESS_CONTROL=false (CloudFormation, which passes it as the EnableEgressControl parameter)
Artifact storageS3 access to buckets named ringleader-*, or to one bucket you nameenable_artifact_storage = false (Terraform) or the EnableArtifactStorage stack parameter (CloudFormation)

Cloud runtime identities and Storage buckets explain the first and third. Outbound restrictions explains the second.

The IAM path for runtime identities is /ringleader-workstations/ on Terraform and /ringleader/ on CloudFormation, unless you set your own (workstation_identity_path or WORKSTATION_IDENTITY_PATH). Roles you created under that path by hand are within reach too.

Runtime identities can reach the whole account

Nothing limits which managed policy Ringleader attaches to a role it creates, AdministratorAccess included. So with runtime identities on, Ringleader can give a workstation access to anything in the account. Use an AWS account dedicated to Ringleader, or turn runtime identities off.

Checks your account makes

When Ringleader asks to act in your account, AWS checks three things about the token it presents. All three are built from the two values Ringleader gave you, and the module and the stack configure them for you.

What AWS checksValueWhere it is configured
Who signed the token<issuer-url>/org/<org-id>the IAM OIDC provider’s URL
Which organization it speaks fororg:<org-id>the role trust policy’s sub condition
Which cloud it may be used against<issuer-url>/org/<org-id>/awsthe provider’s client-id list, and the role trust’s aud condition

The role checks all three, not just who signed the token. Checking only that would accept any token Ringleader signs, including one it signed for another customer.

If AWS turns Ringleader away, compare these three against what was created. Fix a sign-in that your cloud refuses says what to look for.

Egress control permissions

Egress control is on by default. It lets Ringleader write the security group that admits SSH to your workstations, so with it turned off they are reachable only through a rule of your own. A workstation with no egress policy still has no limit on where it connects. It adds these actions:

ActionFor
ec2:CreateSecurityGroup, ec2:DeleteSecurityGroupone group per distinct egress policy, and the group that admits SSH to your workstations
ec2:AuthorizeSecurityGroupEgress, ec2:RevokeSecurityGroupEgresskeep a policy group’s rules in step with the workstation’s configuration, and remove the allow-all outbound rule AWS puts on a new SSH group
ec2:AuthorizeSecurityGroupIngress, ec2:RevokeSecurityGroupIngressthe SSH rules on the SSH group, and the edge instance’s own group, which has to admit workstation traffic
ec2:UpdateSecurityGroupRuleDescriptionsIngressmark a rule on that group as Ringleader’s own, so it revokes only the rules it wrote. It selects a rule that already exists and replaces its description text, expressing no protocol, port or address of its own, so it cannot add, remove or widen a rule
ec2:ModifyNetworkInterfaceAttributemove a running workstation onto the group for its policy, and attach the SSH group. Also clear the source and destination check on the edge instance’s own interface, without which AWS drops every packet it forwards
ec2:CreateRouteTable, ec2:DeleteRouteTable, ec2:CreateRoute, ec2:ReplaceRoute, ec2:DeleteRoute, ec2:AssociateRouteTable, ec2:DisassociateRouteTable, ec2:CreateSubnet, ec2:DeleteSubnetroute traffic to the edge instance, for a policy that names hostnames. An AWS route table attaches per subnet, so routing is per subnet rather than per workstation
ec2:DescribeSecurityGroupRules, ec2:DescribeRouteTablesread back the rules and routes Ringleader wrote, so a rule or route someone else changed is reported rather than silently overwritten
ec2:AllocateAddress, ec2:ReleaseAddress, ec2:AssociateAddress, ec2:DisassociateAddress, ec2:DescribeAddressesreserving a fixed public address for the edge instance’s VM. Ringleader does not use them today: the edge instance’s public address is not reserved, and it changes when Ringleader replaces the instance

The security-group, route-table and subnet writes are limited to your workstations’ VPC. The two reads and the five Elastic IP actions are limited to your region instead. EC2’s Describe actions take no resource-level scoping, and an Elastic IP belongs to no VPC when it is allocated. The three creates are held to your VPC by resource name rather than by a condition, because AWS authorizes a create against the object it makes.

Where no VPC is known, the VPC bound falls away and the region bound is all that is left. Both setup paths set a region. If you reference the Terraform module from your own configuration, set allowed_regions to bound it. It is empty by default, which places no region condition and leaves the whole account as the boundary.

Security groups for workstations

With egress control on, the network the module creates has two security groups, and you send both ids back to Ringleader. Whoever administers Ringleader gives each workstation one of them, depending on whether it has an egress policy.

You send backIt is forLets inLets out
security_group_id / SecurityGroupIda workstation with no egress policyTCP 22 and 2222 from your addresseseverything
inbound_only_security_group_id / InboundOnlySecurityGroupIda workstation with an egress policythe samenothing

To choose between them, follow Choose the security group for workstations. Enforcement points explains why there are two.

Values you hand back

ValueWhere it lands
role ARN (arn:aws:iam::<account-id>:role/ringleader-workstations)CloudAccount spec.aws.targetRoleArn
regionCloudIdentity providerConfig.aws.region
subnet id (only if you created the network)providerConfig.aws.subnetId
security group id (only if you created the network)providerConfig.aws.securityGroupIds
inbound-only security group id (only with the network and egress control)providerConfig.aws.securityGroupIds, for a workstation with an egress policy, as Outbound restrictions explains; see Security groups for workstations
IAM path for runtime identities (only if you use runtime identities)CloudAccount spec.aws.workstationIdentityPath

terraform output handoff prints all of these together except the IAM path, and deploy.sh prints the same ones when it finishes. The IAM path is the one that Setup switches names for the tool you used.

When you write the CloudIdentity from these values, pick an x86-64 instance type. The image aliases (ubuntu-24.04, debian-12, amazonlinux-2023, …) resolve x86-64 AMIs, so an arm64 (Graviton) instance type will not match them. The default instance type, t3.medium, is x86-64, and so is an m6i.* or c6i.* type.

Next steps