# Set Up IAM Role Permissions for an AWS EC2 AIQ Controller

AWS Identity and Access Management (IAM) roles are entities you create and assign specific permissions to that allow trusted identities such as workforce identities and applications to perform actions in AWS.

For more information on IAM roles see the Amazon AWS documentation site: [IAM Roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)

1. Create an IAM Role for the EC2 instance.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/4v9gmLG6hxZ9oJRd-2923a94ce8a1.png)
2. Once the IAM role is created, assign the following policies to the role.
#### EC2 Policy

The following JSON policy, when added to the IAM EC2 Role assigned to the controller, allows the scenario executions to instantiate, start, stop and terminate EC2 test nodes.

<div class="codeSnippet">[Copy](javascript:void(0);)<div class="codeSnippetBody" data-mc-continue="False" data-mc-line-number-start="1" data-mc-use-line-numbers="False">```
{<br></br>    "Version": "2012-10-17",<br></br>    "Statement": [<br></br>        {<br></br>            "Sid": "VisualEditor0",<br></br>            "Effect": "Allow",<br></br>            "Action": [<br></br>                "ec2:DescribeInstances",<br></br>                "ec2:TerminateInstances",<br></br>                "ec2:DescribeTags",<br></br>                "ec2:CreateTags",<br></br>                "ec2:RunInstances",<br></br>                "ec2:StopInstances"            ],<br></br>            "Resource": "*"        }<br></br>    ]<br></br>}
```

 </div> </div>#### S3 Policy for a given bucket 

This policy will allow the AIQ controller to setup AWS S3 storages without the need to provide Access Credentials. In the JSON below replace the your-bucket-name with the bucket name you will be using for your AIQ dashboards.

This is only for AIQ release 5.2.3+.

<div class="codeSnippet">[Copy](javascript:void(0);)<div class="codeSnippetBody" data-mc-continue="False" data-mc-line-number-start="1" data-mc-use-line-numbers="False">```
{<br></br>    "Version": "2012-10-17",<br></br>    "Statement": [<br></br>        {<br></br>            "Effect": "Allow",<br></br>            "Action": [<br></br>                "s3:PutObject",<br></br>                "s3:GetObjectAcl",<br></br>                "s3:GetObject",<br></br>                "s3:ListBucket",<br></br>                "s3:DeleteObject",<br></br>                "s3:PutObjectAcl"<br></br>            ],<br></br>            "Resource": [<br></br>                "arn:aws:s3:::your-bucket-name",<br></br>                "arn:aws:s3:::your-bucket-name/*"<br></br>            ]<br></br>        }<br></br>    ]<br></br>}
```

 </div> </div>10. Select the controller instance and assign the created Role to the controller instance using the **Modify IAM** role option.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/EajaHawBcc5qBIZv-a43dbf0b875d.png)
11. Check the **Security** tab of the controller instance and verify that the AIM role you created is visible.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/lHLDHhlFGdyDAajH-3024781a0b56.png)
 
<div id="bkmrk-last-updated%3A-decemb">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">December 04, 2024</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>