(aws-cloudfront): cdk-nag and Lambda@EDGE issues - AwsSolutions-IAM4 rule #26194
Labels
@aws-cdk/aws-cloudfront
Related to Amazon CloudFront
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
effort/medium
Medium work item – several days of effort
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
When trying to apply
cdk-nag
project to my currentaws-cdk
project (CF + OAI + S3 solution) I started seeing errors I cannot suppress/fix.It seems that
NagSuppressions
does not apply tocloudfront.experimental.EdgeFunction
.Expected Behavior
Expected
cdk-nag
suppression to work.Current Behavior
[Error at /lambda-edge/lambda-edge-0/ServiceRole/Resource] AwsSolutions-IAM4[Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]: The IAM user, role, or group uses AWS managed policies. An AWS managed policy is a standalone policy that is created and administered by AWS. Currently, many AWS managed policies do not restrict resource scope. Replace AWS managed policies with system specific (customer) managed policies.This is a granular rule that returns individual findings that can be suppressed with 'appliesTo'. The findings are in the format 'Policy::<policy>' for AWS managed policies. Example: appliesTo: ['Policy::arn:<AWS::Partition>:iam::aws:policy/foo'].
Reproduction Steps
See above.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.86.0
Framework Version
No response
Node.js Version
18
OS
Ventura 13.4.1
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: