This guide assumes you’ve already configured your AWS organization in
Opal.

ssh access to any EC2 instance running on Amazon to your developers in minutes. We make this easy by using AWS’s Systems Manager API. To make this available for your organization, you’ll have to enable a few things.
Add an EC2 instance
1. Enable Secure Session Manager (SSM)
By default, EC2 instances don’t allowssh sessions using Secure Session Manager. You’ll need to attach the AmazonSSMManagedInstanceCore AWS-managed policy to your EC2 instance profile. If an instance profile doesn’t exist on that instance you’ll have to create one. To determine if your EC2 instance already has a role attached to it, you can check in the AWS Console using the following instructions:
1a. Check the AWS Console
First navigate to your running EC2 instances using this link*.

1b. Create an IAM role
If you already had a role attached skip to the next section. Otherwise, create a new IAM role using the steps below:
AmazonSSMManagedInstanceCore and CloudWatchAgentServerPolicy policies to your new role.

1c. Add the SSM policy to your existing role
Click on the role in the EC2 dashboard to attach a role to it.
AmazonSSMManagedInstanceCore policy and attach it to your existing profile.
2. Tag your EC2 instance
To have Opal automatically import your EC2 instance, you’ll need to tag it. You can do this using the AWS Console, CLI, or Terraform below:AWS Console
Navigate to your EC2 instance in the EC2 Dashboard.
opal tag as seen below.

AWS CLI or Terraform
Optional: Enable KMS Encryption
1. Create an Opal KMS key
To enable KMS encryption, first create a KMS key with the following alias:opalssmkms. Under advanced settings, make sure to make this key multi-regional.
2. Enable encryption
You can enable encryption in the Session Manager console in AWS by going to Systems Manager > Session Manager > Preferences > KMS Encryption and selecting the key created in the previous step.Access your instance in Opal
If you followed the above steps to configure your EC2 instance, it should now show up in Opal.



