I am setting up AWS Managed Active Directory and want to set up an EC2 instance (Windows Server 2019 R2) for managing the AD remotely and an AWS Workspace client with a user to log in. But unfortunately despite the appropriate permission, the Ec2 instance does not join the domain automatically.
According to the AWS article: https://docs.aws.amazon.com/directoryservice/latest/admin-guide/launching_instance.html
Here are the roles assigned: AmazonSSMManagedInstanceCore
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssm:DescribeAssociation",
"ssm:GetDeployablePatchSnapshotForInstance",
"ssm:GetDocument",
"ssm:DescribeDocument",
"ssm:GetManifest",
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:ListAssociations",
"ssm:ListInstanceAssociations",
"ssm:PutInventory",
"ssm:PutComplianceItems",
"ssm:PutConfigurePackageResult",
"ssm:UpdateAssociationStatus",
"ssm:UpdateInstanceAssociationStatus",
"ssm:UpdateInstanceInformation"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ssmmessages:CreateControlChannel",
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:OpenDataChannel"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2messages:AcknowledgeMessage",
"ec2messages:DeleteMessage",
"ec2messages:FailMessage",
"ec2messages:GetEndpoint",
"ec2messages:GetMessages",
"ec2messages:SendReply"
],
"Resource": "*"
}
]
}
And the other policy as: AmazonSSMDirectoryServiceAccess
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ds:CreateComputer",
"ds:DescribeDirectories"
],
"Resource": "*"
}
]
}
With the two policies in place I launched an Instance with AMI ID: ami-041306c411c38a789
After a successful launch I use the set command to review the Domain join but unfortunately I have to do the same manually. Can someone advise why it is so?
You can review the Command page here
Just making sure that the Domain and the Instance are in the same VPC. I am able to check in with the DNS addresses of the domain the instance is recognizing.