EC2 IAM instance profile - AMS Advanced Onboarding Guide

EC2 IAM instance profile

An instance profile is a container for an IAM role that you can use to pass role information to an EC2 instance when the instance starts.

MALZ

Currently there are two AMS default instance profiles, customer-mc-ec2-instance-profile and customer-mc-ec2-instance-profile-s3, these instance profiles provide the permissions described in the following table.

SALZ

Currently there is one AMS default instance profile, customer-mc-ec2-instance-profile, this instance profile provides the permissions described in the following table. The profile grants permissions to the applications. running on the instance, not to users logging into the instance.

Policies often include multiple statements, where each statement grants permissions to a different set of resources or grants permissions under a specific condition.

CW = CloudWatch. ARN = Amazon Resource Name. * = wildcard (any).

EC2 default IAM instance profile permissions

CW = CloudWatch. ARN = Amazon Resource Name. * = wildcard (any).

Policy statement Effect Actions Description and resource (ARN)

Amazon Elastic Compute Cloud (Amazon EC2)

EC2 Message Actions

Allow

AcknowledgeMessage,

DeleteMessage,

FailMessage,

GetEndpoint,

GetMessages,

SendReply

Allows EC2 Systems Manager messaging actions in your account.

Ec2 Describe

Allow

* (All)

Allows the console to display configuration details of an EC2 in your account.

Iam Get Role ID

Allow

GetRole

Allows EC2 to get your IAM ID from aws:iam::*:role/customer-* and aws:iam::*:role/customer_*.

Instance To Upload Log Events

Allow

Create Log Group

Allows logs to be created in: aws:logs:*:*:log-group:i-*

Create Log Stream

Allows logs to be streamed to: aws:logs:*:*:log-group:i-*

CW For MMS

Allow

DescribeAlarms,

PutMetricAlarm,

PutMetricData

Allows CloudWatch to retrieve alarms in your account.

Allows CW to create or update an alarm and associate it with the specified metric.

Allows CW to publish metric data points to your account.

Ec2 Tags

Allow

CreateTags,

DescribeTags,

Allows tags to be added, overwritten, and described on the specified instances in your account.

Explicitly Deny CW Logs

Deny

DescribeLogStreams,

FilterLogEvents,

GetLogEvents

Disallows listing, filtering, or getting the log streams for: aws:logs:*:*:log-group:/mc/*

Amazon EC2 Simple Systems Manager (SSM)

SSM Actions

Allow

DescribeAssociation,

GetDocument,

ListAssociations,

UpdateAssociationStatus,

UpdateInstanceInformation

Allows a variety of SSM functions in your account.

SSM Access In S3

Allow

GetObject,

PutObject,

AbortMultipartUpload,

ListMultipartUploadPorts,

ListBucketMultipartUploads

Allows the SSM on the EC2 to get and update objects in, and to abort a multi-part object upload to, and list ports and buckets available for, multi-part uploads in aws:s3:::mc-*-internal-*/aws/ssm*.

Amazon EC2 Simple Storage Service (S3)

Get Object In S3

Allow

Get

List

Allows EC2 applications to retrieve and list objects in S3 buckets in your account.

Customer Encrypted Log S3 Access

Allow

PutObject

Allows EC2 applications to update objects in aws:s3:::mc-*-logs-*/encrypted/app/*

Patch Data Put Object S3

Allow

PutObject

Allows EC2 applications to upload patching data to your S3 buckets at aws:s3:::awsms-a*-patch-data-*

Uploading Own Logs To S3

Allow

PutObject

Allows EC2 applications to upload custom logs to: aws:s3:::mc-a*-logs-*/aws/instances/*/${aws:userid}/*

Explicitly Deny MC Namespace S3 Logs

Deny

GetObject*

Put*

Disallows EC2 applications getting or putting any objects from or to:

aws:s3:::mc-*-logs-*/encrypted/mc*,

aws:s3:::mc-*-logs-*/mc/*,

aws:s3:::mc-a*-logs-*-audit/*

Explicitly Deny S3 Delete

Deny

* (all)

Disallows EC2 applications taking any action on objects in:

aws:s3:::mc-a*-logs-*/*,

aws:s3:::mc-a*-internal-*/*,

Explicitly Deny S3 CFN Bucket

Deny

Delete*

Disallows EC2 applications deleting any objects from: aws:s3:::cf-templates-*

Explicitly Deny List Bucket S3

Deny

ListBucket

Disallows you listing any encrypted, audit log, or reserved (mc) objects from: aws:s3:::mc-*-logs-*

If you're unfamiliar with Amazon IAM policies, see Overview of IAM Policies for important information.

Note

Policies often include multiple statements, where each statement grants permissions to a different set of resources or grants permissions under a specific condition.