Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit b0a4276

Browse files
authored
fix: update EMR on EKS permissions in the example (#591)
* fix: update EMR on EKS example and fix missing CloudWatch permission on CreateLogGoup * fix: job execution role policy in EMR EKS example for glue default database
1 parent 3bf1e9a commit b0a4276

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

examples/emr-eks-app/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ This example will provision the following resources and features:
1515

1616
### Setup the environement
1717

18-
The `EmrEksCluster` construct requires an IAM Role to be set as the Amazon EKS administrator.
19-
Edit the `lib/emr-eks-app-stack.ts` file (line 16) and add the ARN of the IAM Role you want to use as administrator.
18+
The `EmrEksCluster` construct can take an IAM Role as parameter to set it as the Amazon EKS administrator.
19+
It's optional but if you want to do this, edit the `lib/emr-eks-app-stack.ts` file (line 16) and add the ARN of the IAM Role you want to use as administrator.
2020

2121
The code should look like this:
2222

examples/emr-eks-app/lib/emr-eks-app-stack.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export class EmrEksAppStack extends cdk.Stack {
1414
})
1515

1616
const emrEks = ara.EmrEksCluster.getOrCreate(this,{
17-
eksAdminRoleArn: '<YOUR_ADMIN_ROLE>>',
18-
eksClusterName:'dataplatform',
17+
eksClusterName:'emreks',
1918
autoscaling: ara.Autoscaler.KARPENTER,
2019
});
2120

@@ -49,13 +48,20 @@ export class EmrEksAppStack extends cdk.Stack {
4948
actions:['glue:*'],
5049
resources:[
5150
`arn:aws:glue:${cdk.Aws.REGION}:${cdk.Aws.ACCOUNT_ID}:catalog`,
51+
`arn:aws:glue:${cdk.Aws.REGION}:${cdk.Aws.ACCOUNT_ID}:database/default`,
5252
`arn:aws:glue:${cdk.Aws.REGION}:${cdk.Aws.ACCOUNT_ID}:database/emr_eks_demo`,
5353
`arn:aws:glue:${cdk.Aws.REGION}:${cdk.Aws.ACCOUNT_ID}:table/emr_eks_demo/value_rides`,
5454
`arn:aws:glue:${cdk.Aws.REGION}:${cdk.Aws.ACCOUNT_ID}:table/emr_eks_demo/raw_rides`
5555
],
5656
}),
5757
new iam.PolicyStatement({
58-
effect: iam.Effect.ALLOW, actions:['logs:PutLogEvents','logs:CreateLogStream','logs:DescribeLogGroups','logs:DescribeLogStreams'],
58+
effect: iam.Effect.ALLOW, actions:[
59+
'logs:CreateLogGroup',
60+
'logs:PutLogEvents',
61+
'logs:CreateLogStream',
62+
'logs:DescribeLogGroups',
63+
'logs:DescribeLogStreams'
64+
],
5965
resources:['arn:aws:logs:*:*:*'],
6066
}),
6167
]

examples/emr-eks-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"typescript": "^4.9.4"
2222
},
2323
"dependencies": {
24-
"aws-analytics-reference-architecture": "2.7.2",
24+
"aws-analytics-reference-architecture": "2.8.8",
2525
"aws-cdk-lib": "2.51.0",
2626
"constructs": "^10.0.0",
2727
"source-map-support": "^0.5.21"

0 commit comments

Comments
 (0)