From 67f74adbb43d77820cadc526ae54314924fc9677 Mon Sep 17 00:00:00 2001 From: q0phi80 Date: Wed, 13 Jul 2022 11:21:28 -0700 Subject: [PATCH] Customize AMI --- customized-ami/README.md | 0 customized-ami/config-files/containers.json | 1 + customized-ami/config-files/role-policy.json | 34 +++++++++++++++++++ customized-ami/config-files/trust-policy.json | 15 ++++++++ 4 files changed, 50 insertions(+) create mode 100644 customized-ami/README.md create mode 100644 customized-ami/config-files/containers.json create mode 100644 customized-ami/config-files/role-policy.json create mode 100644 customized-ami/config-files/trust-policy.json diff --git a/customized-ami/README.md b/customized-ami/README.md new file mode 100644 index 0000000..e69de29 diff --git a/customized-ami/config-files/containers.json b/customized-ami/config-files/containers.json new file mode 100644 index 0000000..7fe9e07 --- /dev/null +++ b/customized-ami/config-files/containers.json @@ -0,0 +1 @@ +[{ "Description": "Windows 10 Pro", "Format": "vhd", "UserBucket": { "S3Bucket": "fluffy-wabbit-bucket", "S3Key": "Windows-10.vhd" } }] diff --git a/customized-ami/config-files/role-policy.json b/customized-ami/config-files/role-policy.json new file mode 100644 index 0000000..85ddb3f --- /dev/null +++ b/customized-ami/config-files/role-policy.json @@ -0,0 +1,34 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "s3:ListBucket", + "s3:GetBucketLocation" + ], + "Resource": [ + "arn:aws:s3:::fluffy-wabbit-bucket" + ] + }, + { + "Effect": "Allow", + "Action": [ + "s3:GetObject" + ], + "Resource": [ + "arn:aws:s3:::fluffy-wabbit-bucket/*" + ] + }, + { + "Effect": "Allow", + "Action":[ + "ec2:ModifySnapshotAttribute", + "ec2:CopySnapshot", + "ec2:RegisterImage", + "ec2:Describe*" + ], + "Resource": "*" + } + ] +} diff --git a/customized-ami/config-files/trust-policy.json b/customized-ami/config-files/trust-policy.json new file mode 100644 index 0000000..c60e6ff --- /dev/null +++ b/customized-ami/config-files/trust-policy.json @@ -0,0 +1,15 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { "Service": "vmie.amazonaws.com" }, + "Action": "sts:AssumeRole", + "Condition": { + "StringEquals":{ + "sts:Externalid": "vmimport" + } + } + } + ] +}