This doc maps each manifest in samples to the minimal IAM permissions needed to create and run the test and resources.
The policies can be created using the aws iam create-policy command and attached to a role using aws iam attach-role-policy.
These policies do not include the iam:CreateRole permission.
In order for the resources and tests to be created as desired, the ARN of an existing role should be provided instead.
-
For ECS clusters, this can be accomplished by adding a field
iamInstanceProfileNameto the ECS cluster config, the value of which is the ARN of a role with at least these permissions: ecs-iam-instance-profile.json. -
For EKS clusters, this can be accomplished by replacing the
clusterName,region, andversionfields with anencodedConfigfield in the EKS cluster config. This field's value should be a string representing a base64-encoded EKS cluster config, an example of which can be found here. This config should contain the ARNs of an existing service role and an existing node instance role with at least these permissions: eks-service-role.json and eks-node-instance-role.json.
- ecs-test-agent: ecs-test-agent.json
- ecs-resource-agent: ecs-resource-agent.json
- ec2-resource-agent: ec2-resource-agent.json
- ecs-test-agent: ecs-test-agent.json
- migration-test-agent: migration-test-agent.json
- ecs-resource-agent: ecs-resource-agent.json
- ec2-resource-agent: ec2-resource-agent.json
- ecs-workload-agent: ecs-workload-agent.json
- ecs-resource-agent: ecs-resource-agent.json
- ec2-resource-agent: ec2-resource-agent.json
- sonobuoy-test-agent: sonobuoy-test-agent.json
- eks-resource-agent: eks-resource-agent.json (if cluster should be created) eks-resource-agent-existing-cluster.json (if cluster already exists)
- ec2-resource-agent: ec2-resource-agent.json
- sonobuoy-test-agent: sonobuoy-test-agent.json
- migration-test-agent: migration-test-agent.json
- eks-resource-agent: eks-resource-agent.json (if cluster should be created) eks-resource-agent-existing-cluster.json (if cluster already exists)
- ec2-resource-agent: ec2-resource-agent.json
- k8s-workload-agent: k8s-workload-agent.json
- eks-resource-agent: eks-resource-agent.json (if cluster should be created) eks-resource-agent-existing-cluster.json (if cluster already exists)
- ec2-resource-agent: ec2-resource-agent.json
Some of these policies include the iam:CreateRole permission.
Note: This is considered dangerous because there is no limit to the permissions and policies that can be assigned to the role created this way, so this new role could end up with Administrator privileges.
- ecs-test-agent: ecs-test-agent.json
- ecs-resource-agent: ecs-resource-agent.json
- ec2-resource-agent: ec2-resource-agent.json
- ecs-test-agent: ecs-test-agent.json
- migration-test-agent: migration-test-agent.json
- ecs-resource-agent: ecs-resource-agent.json
- ec2-resource-agent: ec2-resource-agent.json
- ecs-workload-agent: ecs-workload-agent.json
- ecs-resource-agent: ecs-resource-agent.json
- ec2-resource-agent: ec2-resource-agent.json
- sonobuoy-test-agent: sonobuoy-test-agent.json
- eks-resource-agent: eks-resource-agent.json (if cluster should be created) eks-resource-agent-existing-cluster.json (if cluster already exists)
- ec2-resource-agent: ec2-resource-agent.json
- sonobuoy-test-agent: sonobuoy-test-agent.json
- migration-test-agent: migration-test-agent.json
- eks-resource-agent: eks-resource-agent.json (if cluster should be created) eks-resource-agent-existing-cluster.json (if cluster already exists)
- ec2-resource-agent: ec2-resource-agent.json
- k8s-workload-agent: k8s-workload-agent.json
- eks-resource-agent: eks-resource-agent.json (if cluster should be created) eks-resource-agent-existing-cluster.json (if cluster already exists)
- ec2-resource-agent: ec2-resource-agent.json