- Service role — used by the EMR service to manage cluster resources.
- Autoscaling role — used by Application Auto Scaling and EMR to scale instance groups.
- EC2 instance profile role — assumed by EC2 instances in the cluster to access AWS services.
The service role is tagged with
{ "for-use-with-amazon-emr-managed-policies" = true } and is attached the AmazonEMRServicePolicy_v2 managed policy by default. This policy requires you to tag your VPC and subnets with the same key before EMR can create and manage cluster resources. See the AWS documentation for details.Service IAM role
Set to
false to skip creating the service role and supply an existing role via service_iam_role_arn.ARN of an existing service role to use when
create_service_iam_role = false.Name for the service IAM role. Defaults to
"<cluster-name>-service". When iam_role_use_name_prefix = true this value is used as a name prefix.Description attached to the service IAM role.
Map of IAM policy ARNs to attach to the service role. Defaults to
AmazonEMRServicePolicy_v2. The key is used as a logical identifier; the value is the policy ARN. You can add additional policies or replace the default.Service pass-role policy
The module also creates an inlineiam:PassRole policy and attaches it to the service role. This allows the EMR service to pass the autoscaling and instance profile roles to Application Auto Scaling and EC2.
Name for the pass-role policy. Defaults to
"<cluster-name>-passrole".Description attached to the pass-role policy.
Autoscaling IAM role
The autoscaling role is only created when using instance groups. It is automatically skipped when you configure instance fleets (master_instance_fleet or core_instance_fleet).
Set to
false to skip creating the autoscaling role and supply an existing role via autoscaling_iam_role_arn.ARN of an existing autoscaling role to use when
create_autoscaling_iam_role = false.Name for the autoscaling IAM role. Defaults to
"<cluster-name>-autoscaling".Description attached to the autoscaling IAM role.
AmazonElasticMapReduceforAutoScalingRole AWS managed policy to this role.
EC2 instance profile
Set to
false to skip creating the EC2 IAM role and instance profile. You must then supply an existing profile name via iam_instance_profile_name.Name for the EC2 IAM role and instance profile. Defaults to
"<cluster-name>-instance". Also used to reference an existing profile when create_iam_instance_profile = false.Description for the EC2 IAM role.
Map of IAM policy ARNs to attach to the instance profile role. Defaults to
AmazonElasticMapReduceforEC2Role.ARN of an existing IAM role to use when you supply a custom instance profile but still want the module to create a service role (for the pass-role policy).
Common IAM settings
The following variables apply to all three roles.When
true, the role name is used as a prefix and AWS appends a unique suffix. This avoids name collisions when deploying multiple clusters.IAM path for all roles created by the module, for example
"/emr/".ARN of an IAM policy to use as the permissions boundary for all roles.
Additional tags to merge onto all IAM roles.