Skip to content

Commit

Permalink
Fixed basic execution role to include required service-role/ prefix
Browse files Browse the repository at this point in the history
Closes #11
  • Loading branch information
bmiller08 committed Oct 13, 2021
1 parent 88dfa40 commit 61e02ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class Certbot extends cdk.Construct {
props.enableInsights = (props.enableInsights === undefined) ? false : props.enableInsights;
props.insightsARN = (props.insightsARN === undefined) ? 'arn:aws:lambda:' + cdk.Stack.of(this).region + ':580247275435:layer:LambdaInsightsExtension:14' : props.insightsARN;

let managedPolicies = [iam.ManagedPolicy.fromAwsManagedPolicyName('AWSLambdaBasicExecutionRole')];
let managedPolicies = [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaBasicExecutionRole')];
if (props.enableInsights) {
managedPolicies.push(iam.ManagedPolicy.fromAwsManagedPolicyName('CloudWatchLambdaInsightsExecutionRolePolicy'));
props.layers.push(lambda.LayerVersion.fromLayerVersionArn(this, 'insightsLayer', props.insightsARN));
Expand Down

0 comments on commit 61e02ee

Please sign in to comment.