Service role for EMR Notebooks
Each EMR notebook needs permissions to access other Amazon resources and
                perform actions. The IAM policies attached to this service role provide
                permissions for the notebook to interoperate with other Amazon services. When you
                create a notebook using the Amazon Web Services Management Console, you specify an Amazon service
                    role. You can use the default role,
                    EMR_Notebooks_DefaultRole, or specify a role that you create. If a
                notebook has not been created before, you can choose to create the default
                role.
- 
                    The default role name is EMR_Notebooks_DefaultRole.
- 
                    The default managed policies attached to EMR_Notebooks_DefaultRoleareAmazonElasticMapReduceEditorsRoleandS3FullAccessPolicy.
Your service role should use the following trust policy.
Important
The following trust policy includes the aws:SourceArn and aws:SourceAccount global condition keys, which
                    limit the permissions that you give Amazon EMR to particular resources in your
                    account. Using them can protect you against the confused deputy
                        problem.
The contents of version 1 of AmazonElasticMapReduceEditorsRole are as
                follows.
Following is the contents of the S3FullAccessPolicy. The
                    S3FullAccessPolicy allows your service role for EMR Notebooks to
                perform all Amazon S3 actions on objects in your Amazon Web Services account. When you
                create a custom service role for EMR Notebooks, you must give your service role
                Amazon S3 permissions.
You can scope down read and write access for your service role to the Amazon S3 location where you want to save your notebook files. Use the following minimum set of Amazon S3 permissions.
"s3:PutObject", "s3:GetObject", "s3:GetEncryptionConfiguration", "s3:ListBucket", "s3:DeleteObject"
If your Amazon S3 bucket is encrypted, you must include the following permissions for Amazon Key Management Service.
"kms:Decrypt", "kms:GenerateDataKey", "kms:ReEncryptFrom", "kms:ReEncryptTo", "kms:DescribeKey"
When you link Git repositories to your notebook and need to create a secret for
                the repository, you must add the secretsmanager:GetSecretValue
                permission in the IAM policy attached to the service role for Amazon EMR notebooks. An
                example policy is demonstrated below: 
EMR Notebooks service role permissions
This table lists the actions that EMR Notebooks takes using the service role, along with the permissions that are needed for each action.
| Action | Permissions | 
|---|---|
| Establish a secure network channel between a notebook and an Amazon EMR cluster, and perform necessary cleanup actions. |  | 
| Use Git credentials stored in Amazon Secrets Manager to link Git repositories to a notebook. |  | 
| Apply Amazon tags to the network interface and default security groups that EMR Notebooks creates while setting up the secure network channel. For more information, see Tagging Amazon resources. |  | 
| Access or upload notebook files and metadata to Amazon S3. | 
 The following permissions are only required if you use an encrypted Amazon S3 bucket. 
 | 
EMR Notebooks updates to Amazon managed policies
View details about updates to Amazon managed policies for EMR Notebooks since March 1, 2021.
| Change | Description | Date | 
|---|---|---|
| AmazonElasticMapReduceEditorsRole - Added
                                        permissions | EMR Notebooks added  | Feb 8, 2023 | 
| EMR Notebooks started tracking changes | EMR Notebooks started tracking changes for its Amazon managed policies. | Feb 8, 2023 |