{
	"id": "18ab1f16-2a20-4192-8026-8543b2545223",
	"created_at": "2026-04-06T01:31:01.357127Z",
	"updated_at": "2026-04-10T03:35:21.400268Z",
	"deleted_at": null,
	"sha1_hash": "984c4e71fc6b819a2bfead5e0550d407d67fb211",
	"title": "Grant a user permissions to pass a role to an AWS service",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 83238,
	"plain_text": "Grant a user permissions to pass a role to an AWS service\r\nArchived: 2026-04-06 00:16:16 UTC\r\nTo configure many AWS services, you must pass an IAM role to the service. This allows the service to assume the\r\nrole later and perform actions on your behalf. For most services, you only have to pass the role to the service once\r\nduring setup, and not every time that the service assumes the role. For example, assume that you have an\r\napplication running on an Amazon EC2 instance. That application requires temporary credentials for\r\nauthentication, and permissions to authorize the application to perform actions in AWS. When you set up the\r\napplication, you must pass a role to Amazon EC2 to use with the instance that provides those credentials. You\r\ndefine the permissions for the applications running on the instance by attaching an IAM policy to the role. The\r\napplication assumes the role every time it needs to perform the actions that are allowed by the role.\r\nTo pass a role (and its permissions) to an AWS service, a user must have permissions to pass the role to the\r\nservice. This helps administrators ensure that only approved users can configure a service with a role that grants\r\npermissions. To allow a user to pass a role to an AWS service, you must grant the PassRole permission to the\r\nuser's IAM user, role, or group.\r\nWarning\r\nYou can only use the PassRole permission to pass an IAM role to a service that shares the same AWS\r\naccount. To pass a role in Account A to a service in Account B, you must first create an IAM role in\r\nAccount B that can assume the role from Account A, and then the role in Account B can be passed to the\r\nservice. For details, see Cross account resource access in IAM.\r\nDo not try to control who can pass a role by tagging the role and then using the ResourceTag condition\r\nkey in a policy with the iam:PassRole action. This approach does not have reliable results.\r\nWhen setting the PassRole permission, you should make sure that a user doesn’t pass a role where the role has\r\nmore permissions than you want the user to have. For example, Alice might not be allowed to perform any\r\nAmazon S3 actions. If Alice could pass a role to a service that allows Amazon S3 actions, the service could\r\nperform Amazon S3 actions on behalf of Alice when executing the job.\r\nWhen you specify a service-linked role, you must also have permission to pass that role to the service. Some\r\nservices automatically create a service-linked role in your account when you perform an action in that service. For\r\nexample, Amazon EC2 Auto Scaling creates the AWSServiceRoleForAutoScaling service-linked role for you\r\nwhen you create an Auto Scaling group for the first time. If you try to specify the service-linked role when you\r\ncreate an Auto Scaling group and you don't have the iam:PassRole permission, you receive an error. If you don't\r\nexplicitly specify the role, the iam:PassRole permission is not required, and the default is to use\r\nAWSServiceRoleForAutoScaling role for all operations that are performed on that group. To learn which services\r\nsupport service-linked roles, see AWS services that work with IAM. To learn which services automatically create a\r\nservice-linked role when you perform an action in that service, choose the Yes link and view the service-linked\r\nrole documentation for the service.\r\nhttps://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html\r\nPage 1 of 5\n\nA user can pass a role ARN as a parameter in any API operation that uses the role to assign permissions to the\r\nservice. The service then checks whether that user has the iam:PassRole permission. To limit the user to passing\r\nonly approved roles, you can filter the iam:PassRole permission with the Resources element of the IAM\r\npolicy statement.\r\nYou can use the Condition element in a JSON policy to test the value of keys included in the request context of\r\nall AWS requests. To learn more about using condition keys in a policy, see IAM JSON policy elements:\r\nCondition. The iam:PassedToService condition key can be used to specify the service principal of the service to\r\nwhich a role can be passed. To learn more about using the iam:PassedToService condition key in a policy, see\r\niam:PassedToService.\r\nExample 1\r\nSuppose you want to grant a user the ability to pass any of an approved set of roles to the Amazon EC2 service\r\nupon launching an instance. You need three elements:\r\nAn IAM permissions policy attached to the role that determines what the role can do. Scope permissions to\r\nonly the actions that the role must perform, and to only the resources that the role needs for those actions.\r\nYou can use an AWS managed or customer-created IAM permissions policy.\r\n{\r\n \"Version\":\"2012-10-17\",\r\n \"Statement\": {\r\n \"Effect\": \"Allow\",\r\n \"Action\": [ \" A list of the permissions the role is allowed to use \" ],\r\n \"Resource\": [ \" A list of the resources the role is allowed to access \" ]\r\n }\r\n}\r\nA trust policy for the role that allows the service to assume the role. For example, you could attach the\r\nfollowing trust policy to the role with the UpdateAssumeRolePolicy action. This trust policy allows\r\nAmazon EC2 to use the role and the permissions attached to the role.\r\n{\r\n \"Version\":\"2012-10-17\",\r\n \"Statement\": {\r\n \"Sid\": \"TrustPolicyStatementThatAllowsEC2ServiceToAssumeTheAttachedRole\",\r\n \"Effect\": \"Allow\",\r\n \"Principal\": { \"Service\": \"ec2.amazonaws.com\" },\r\n \"Action\": \"sts:AssumeRole\"\r\n }\r\n}\r\nhttps://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html\r\nPage 2 of 5\n\nAn IAM permissions policy attached to the IAM user that allows the user to pass only those approved\r\nroles. You usually add iam:GetRole to iam:PassRole so the user can get the details of the role to be\r\npassed. In this example, the user can pass only roles that exist in the specified account with names\r\nbeginning with EC2-roles-for-XYZ- :\r\n{\r\n \"Version\":\"2012-10-17\",\r\n \"Statement\": [\r\n {\r\n \"Effect\": \"Allow\",\r\n \"Action\": [\r\n \"iam:GetRole\",\r\n \"iam:PassRole\"\r\n ],\r\n \"Resource\": \"arn:aws:iam:: 111122223333 :role/EC2-roles-for-XYZ-*\"\r\n }\r\n ]\r\n}\r\nNow the user can start an Amazon EC2 instance with an assigned role. Applications running on the instance can\r\naccess temporary credentials for the role through the instance profile metadata. The permissions policies attached\r\nto the role determine what the instance can do.\r\nExample 2\r\nAmazon Relational Database Service (Amazon RDS) supports a feature called Enhanced Monitoring. This\r\nfeature enables Amazon RDS to monitor a database instance using an agent. It also allows Amazon RDS to log\r\nmetrics to Amazon CloudWatch Logs. To enable this feature, you must create a service role to give Amazon RDS\r\npermissions to monitor and write metrics to your logs.\r\nTo create a role for Amazon RDS enhanced monitoring\r\n1. Sign in to the AWS Management Console and open the IAM console at\r\nhttps://console.aws.amazon.com/iam/.\r\n2. Choose Roles, and then choose Create role.\r\n3. Choose the AWS Service role type, and then for Use cases for other AWS services, choose the RDS\r\nservice. Choose RDS – Enhanced Monitoring, and then choose Next.\r\n4. Choose the AmazonRDSEnhancedMonitoringRole permissions policy.\r\n5. Choose Next.\r\n6. For Role name, enter a role name that helps you identify the purpose of this role. Role names must be\r\nunique within your AWS account. When a role name is used in a policy or as part of an ARN, the role name\r\nhttps://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html\r\nPage 3 of 5\n\nis case sensitive. When a role name appears to customers in the console, such as during the sign-in process,\r\nthe role name is case insensitive. Because various entities might reference the role, you can't edit the name\r\nof the role after it is created.\r\n7. (Optional) For Description, enter a description for the new role.\r\n8. (Optional) Add metadata to the user by attaching tags as key-value pairs. For more information about using\r\ntags in IAM, see Tags for AWS Identity and Access Management resources.\r\n9. Review the role and then choose Create role.\r\nThe role automatically gets a trust policy that grants the monitoring.rds.amazonaws.com service permissions to\r\nassume the role. After it does, Amazon RDS can perform all of the actions that the\r\nAmazonRDSEnhancedMonitoringRole policy allows.\r\nThe user that you want to access Enhanced Monitoring needs a policy that includes a statement that allows the\r\nuser to to list the RDS roles and a statement that allows the user to pass the role, like the following. Use your\r\naccount number and replace the role name with the name you provided in step 6.\r\n {\r\n \"Sid\": \"PolicyStatementToAllowUserToListRoles\",\r\n \"Effect\": \"Allow\",\r\n \"Action\": [\"iam:ListRoles\"],\r\n \"Resource\": \"*\"\r\n },\r\n {\r\n \"Sid\": \"PolicyStatementToAllowUserToPassOneSpecificRole\",\r\n \"Effect\": \"Allow\",\r\n \"Action\": [ \"iam:PassRole\" ],\r\n \"Resource\": \"arn:aws:iam:: account-id :role/ RDS-Monitoring-Role \"\r\n }\r\n \r\nYou can combine this statement with statements in another policy or put it in its own policy. To instead specify\r\nthat the user can pass any role that begins with RDS- , you can replace the role name in the resource ARN with a\r\nwildcard, as follows.\r\n \"Resource\": \"arn:aws:iam:: account-id :role/RDS-*\"\r\niam:PassRole actions in AWS CloudTrail logs\r\nPassRole is not an API call. PassRole is a permission, meaning no CloudTrail logs are generated for IAM\r\nPassRole . To review what roles are passed to which AWS services in CloudTrail, you must review the\r\nCloudTrail log that created or modified the AWS resource receiving the role. For example, a role is passed to an\r\nhttps://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html\r\nPage 4 of 5\n\nAWS Lambda function when it's created. The log for the CreateFunction action shows a record of role that was\r\npassed to the function.\r\nSource: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html\r\nhttps://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html\r\nPage 5 of 5",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html"
	],
	"report_names": [
		"id_roles_use_passrole.html"
	],
	"threat_actors": [
		{
			"id": "2864e40a-f233-4618-ac61-b03760a41cbb",
			"created_at": "2023-12-01T02:02:34.272108Z",
			"updated_at": "2026-04-10T02:00:04.97558Z",
			"deleted_at": null,
			"main_name": "WildCard",
			"aliases": [],
			"source_name": "ETDA:WildCard",
			"tools": [
				"RustDown",
				"SysJoker"
			],
			"source_id": "ETDA",
			"reports": null
		},
		{
			"id": "256a6a2d-e8a2-4497-b399-628a7fad4b3e",
			"created_at": "2023-11-30T02:00:07.299845Z",
			"updated_at": "2026-04-10T02:00:03.484788Z",
			"deleted_at": null,
			"main_name": "WildCard",
			"aliases": [],
			"source_name": "MISPGALAXY:WildCard",
			"tools": [],
			"source_id": "MISPGALAXY",
			"reports": null
		}
	],
	"ts_created_at": 1775439061,
	"ts_updated_at": 1775792121,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/984c4e71fc6b819a2bfead5e0550d407d67fb211.pdf",
		"text": "https://archive.orkl.eu/984c4e71fc6b819a2bfead5e0550d407d67fb211.txt",
		"img": "https://archive.orkl.eu/984c4e71fc6b819a2bfead5e0550d407d67fb211.jpg"
	}
}