In this video I will walkthrough the process of setting up a separate AWS User for the Lightsail Console with restricted permissions. This will be useful if you need to give access to someone else other than you to maintain a Lightsail server instance. If you need to have someone let’s say manage a Lightsail instance you might think about giving your AWS credentials, which you should not do, Instead you should setup a specific user with only access to the instances they would need to manage. You might have some other use cases for this as well.
Steps:
- Login to Lightsail Dashboard/Console
- Go to AWS Console.
- Go to IAM (Identify Access Management)
- Create Lightsail Policy
- AWS Policies define the level of permissions for AWS resources
- Then you would apply the policy to the user
- Open PowerShell and Get Instance ARN.
- Create Group and Assign Policy
- Create User and Add to Group.
- Give Console Access
- Auto-generate Password
- Open a new browser, login as new user
- Test out the permissions.
Lightsail Custom Policy JSON:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"lightsail:Get*"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Deny",
"Action": [
"lightsail:GetInstanceAccessDetails"
],
"Resource": "[DENIED ARN INSTANCE GOES HERE]"
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"lightsail:Get*",
"lightsail:PutInstancePublicPorts",
"lightsail:StartInstance",
"lightsail:StopInstance",
"lightsail:RebootInstance",
"lightsail:OpenInstancePublicPorts",
"lightsail:CloseInstancePublicPorts",
"lightsail:CreateInstanceSnapshot",
"lightsail:GetInstanceAccessDetails"
],
"Resource": "[ALLOWED ARN INSTANCE GOES HERE]"
}
]
}
Full Permissions to Lightsail Custom Policy JSON:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"lightsail:*"
],
"Resource": "*"
}
]
}
All videos tutorials on the website as well as the YouTube channel aim to provide a simplified process for a specific scenario; there could be many different factors and unique use cases you may have. The tutorials may not cover every situation; so treat is as a starting point or learning concept to apply to your unique situations, and consider this inspiration but not prescription or explicit direction.