aws-samples / aws-control-tower-guardduty-enabler

Apache License 2.0
41 stars 26 forks source link

GDLifeCycleRule does not have trigger permission for Lambda GuardDutyEnablerLambda #16

Closed mirajranpura closed 4 years ago

mirajranpura commented 4 years ago

There must be resource AWS::Lambda::Permission for GDLifeCycleRule ( which is based on CloudTrail event CreateManagedAccount ) so that it can trigger GuardDutyEnablerLambda. Quick Fix is to add following snippet to Resources section:

GuardDutyEnablerPermissionForLifeCycleEventToInvokeLambda: Type: AWS::Lambda::Permission Properties: FunctionName: !GetAtt GuardDutyEnablerLambda.Arn Action: lambda:InvokeFunction Principal: events.amazonaws.com SourceArn: !GetAtt GDLifeCycleRule.Arn