Skip to content

Instantly share code, notes, and snippets.

@slmingol
Forked from mechcozmo/IAM Permissions List.md
Created September 15, 2019 20:43
Show Gist options
  • Save slmingol/d1eff788d1417d7ac160eda57131c7d0 to your computer and use it in GitHub Desktop.
Save slmingol/d1eff788d1417d7ac160eda57131c7d0 to your computer and use it in GitHub Desktop.
A list of IAM permissions you can use in policy documents. Collected from the myriad of places Amazon hides them. (incomplete)

List of IAM Permissions

This is a list of controls that can be placed into an IAM policy document. All content comes from AWS documentation.

Something wrong? Try looking here.

Table of Contents generated with DocToc

  • aws:CurrentTime —To check for date/time conditions.
  • aws:EpochTime —To check for date/time conditions using a date in epoch or UNIX time.
  • aws:TokenIssueTime This is the date and time that temporary security credentials were issued and can be used with date/time conditions. (Note: This key is only available in requests that are signed using temporary security credentials. For more information about temporary security credentials, see Temporary Security Credentials.)
  • aws:principaltype —To check the type of principal (user, account, federated user, - etc.) for the current request.
  • aws:SecureTransport —To check whether the request was sent using SSL. For services - that use only SSL, such as Amazon RDS and Amazon Route 53, the aws:SecureTransport - key has no meaning.
  • aws:SourceArn —To check the source of the request, using the Amazon Resource Name - (ARN) of the source. (This value is available for only some services. For more - information, see Amazon Resource Name (ARN) under "Element Descriptions" in the - Amazon Simple Queue Service Developer Guide.)
  • aws:SourceIp —To check the IP address of the requester. Note that if you use - aws:SourceIp, and the request comes from an Amazon EC2 instance, the public IP - address of the instance is evaluated.
  • aws:UserAgent —To check the client application that made the request.
  • aws:userid —To check the user ID of the requester.
  • aws:username —To check the user name of the requester, if available.
  • ec2:SourceInstanceARN This is the Amazon Resource Name (ARN) of the Amazon EC2 instance from which the request is made. This key is present only when the request comes from an Amazon EC2 instance using an IAM role associated with an EC2 instance profile.

The values for aws:username, aws:userid, and aws:principaltype depend on what type of principal initiated the request—whether the request was made using the credentials of an AWS account, an IAM user, an IAM role, and so on. The following table shows values for these keys for different types of principal.

Principal aws:username aws:userid aws:principaltype
AWS account (not present) AWS account ID Account
IAM user IAM-user-name unique ID User
Federated user (not present) account:caller-specified-name FederatedUser
Web federated user (Login with Amazon, Amazon Cognito, Facebook, Google) * (not present) role id:caller-specified-role-name AssumedRole
SAML federated user ** (not present) role id:caller-specified-role-name AssumedRole
Assumed role (not present) role-id:caller-specified-role-name AssumedRole
Role assigned to an Amazon EC2 instance (not present) role-id:ec2-instance-id AssumedRole
Anonymous caller (Amazon SQS, Amazon SNS, and Amazon S3 only) (not present) (not present) Anonymous

* For information about policy keys that are available when you use web identity federation, see Identifying Users with Web Identity Federation.

** For information about policy keys that are available when you use SAML federation, see Uniquely Identifying Users in SAML-Based Federation.

In this table:

  • not present means that the value is not in the current request information, and any attempt to match it fails and causes the request to be denied.
  • role-id is a unique identifier assigned to each role at creation. You can display the role ID with the AWS CLI command: aws iam get-role --role-name ${rolename}
  • caller-specified-name and caller-specified-role-name are names that are passed by the calling process (e.g. application or service) when it makes a call to get temporary credentials.
  • ec2-instance-id is a value assigned to the instance when it is launched and appears on the Instances page of the Amazon EC2 console. You can also display the instance ID by running the AWS CLI command: aws ec2 describe-instances

aws-portal:

  • ModifyAccount
  • ModifyBilling
  • ModifyPaymentMethods
  • ViewAccount
  • ViewBilling
  • ViewBudget
  • ViewPaymentMethods
  • ViewUsage

autoscaling:

cloudformation:

cloudtrail:

cloudwatch:

logs:

dms:

dynamodb:

elasticbeanstalk:

elasticache:

ec2:

ecs:

elasticfilesystem:

elasticloadbalancing:

elasticmapreduce:

iam:

kinesis:

kms:

lambda:

[OpsWorks](AWS OpsWorks)

opsworks:

rds:

redshift:

route53:

route53domains:

s3:

sts:

ses:

sqs:

support:

trustedadvisor:

  • DescribeCheckSummaries
  • DescribeCheckItems
  • RefreshCheck
  • DescribeCheckRefreshStatuses
  • ExcludeCheckItems
  • IncludeCheckItems
  • DescribeNotificationPreferences
  • UpdateNotificationPreferences
@ivanilves
Copy link

Awesome gist!

I think we miss iam:ListUserTags for IAM 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment