CloudFormation Lint Version
1.28.0
What operating system are you using?
Mac
Describe the bug
Resource handler returned message: "The request failed because both data sources and features were provided. You can provide only one; it is recommended to use features.
When setting up GuardDuty, you cannot specify both Data Sources and Features. It's recommended to use Features. Cfn-lint should catch this.
Expected behavior
Cfn-lint raises an error when both Data Sources and Features are specified.
Reproduction template
SecuritySvcGuardDutyDetectorC58A14AA:
Type: AWS::GuardDuty::Detector
Properties:
DataSources:
MalwareProtection:
ScanEc2InstanceWithFindings:
EbsVolumes: false
S3Logs:
Enable: true
Enable: true
Features:
- Name: S3_DATA_EVENTS
Status: ENABLED
- Name: RDS_LOGIN_EVENTS
Status: ENABLED
- Name: RUNTIME_MONITORING
Status: ENABLED
FindingPublishingFrequency: ONE_HOUR
Tags:
- Key: service-name
Value: security-svc
Metadata:
aws:cdk:path: CoreStackDev/SecuritySvc/GuardDutyDetector
CloudFormation Lint Version
1.28.0
What operating system are you using?
Mac
Describe the bug
When setting up GuardDuty, you cannot specify both
Data SourcesandFeatures. It's recommended to useFeatures. Cfn-lint should catch this.Expected behavior
Cfn-lint raises an error when both Data Sources and Features are specified.
Reproduction template