-
Notifications
You must be signed in to change notification settings - Fork 625
Open
Description
CloudFormation Lint Version
1.40.4
What operating system are you using?
Mac
Describe the bug
Malformed ARN not detected by cfn-lint, but is detected by CloudFormation.
CloudFormation Error:
Resource handler returned message: "Invalid principal in policy: "AWS":"arn:aws::iam:::root" (Service: Iam, Status Code: 400, Request ID: ) (SDK Attempt Count: 1)" (RequestToken: , HandlerErrorCode: InvalidRequest)
Expected behavior
cfn-lint identifies the malformed ARN and raised an Invalid principal in policy error.
Reproduction template
---
AWSTemplateFormatVersion: '2010-09-09'
Description: demo
Resources:
Role:
Type: AWS::IAM::Role
Properties:
RoleName: SomeRoleName
Description: Role for something
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- sts:AssumeRole
Principal:
AWS: !Sub 'arn:${AWS::Partition}::iam::${AWS::AccountId}:root'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels