Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design update for EncryptRootVolume to explain IAM Automate Service r… #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 97 additions & 4 deletions Documents/Automation/EncryptRootVolume/Design/Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,106 @@ Encrypts the root volume of an EC2 instance. This will be a replace operation a
Refer to schema.json

Document Steps:
1. aws:npark-encryptrootvolume - Execute CloudFormation Template to attach the volume.
1. Create automation service role
* Create a role with following policies:
• AmazonEC2FullAccess (AWS Managed)
• AmazonSSMAutomationRole (AWS Managed)
• AWSKeyManagementServicePowerUser (AWS Managed)
In addition, following inline policies must be created and attached
```json
• createlambda (inline)
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"lambda:CreateFunction",
"lambda:GetFunction",
"lambda:DeleteFunction"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"iam:GetRole",
"iam:PassRole",
"iam:DeleteRolePolicy",
"iam:CreateRole",
"iam:DeleteRole",
"iam:PutRolePolicy"
],
"Resource": "arn:aws:iam::*:role/*",
"Effect": "Allow"
}
]
}
```

```json
• ebsvolumepermission (inline)
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ec2:AttachVolume",
"ec2:DetachVolume"
],
"Resource": "arn:aws:ec2:*:*:instance/*",
"Effect": "Allow"
},
{
"Action": [
"ec2:AttachVolume",
"ec2:DetachVolume"
],
"Resource": "arn:aws:ec2:*:*:volume/*",
"Effect": "Allow"
}
]
}
```

```json
• invokeLambdaFunction (inline)
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "lambda:InvokeFunction",
"Resource": [
"arn:aws:lambda:*:*:function:*"
],
"Effect": "Allow"
}
]
}
```

```json
• kmsaccess (inline)
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"kms:*"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
]
}
```

2. aws:npark-encryptrootvolume - Execute CloudFormation Template to attach the volume.
* Parameters:
* instanceId: (Required) Instance ID of the ec2 instance whose root volume needs to be encrypted
* region: (Required) Region in which the ec2 instance belong
* KmsKeyId: (Required) Customer KMS key to use during the encryption
* devicename: (Optional) Device name of the root volume. Defaults to /dev/sda1
* AutomationAssumeRole: (Optional) The ARN of the role that allows Automation to perform the actions on your behalf
* AutomationAssumeRole: (Optional) The ARN of the role that allows Automation to perform the actions on your behalf. See step 1 for details.

## Test script

Expand Down