{"record":{"id":"c4bd878b8ba2d74e","repo":"crowdsecurity/crowdsec","slug":"start-date-and-end-date-or-backlog-are-mandatory-i","errorCode":null,"errorMessage":"start_date and end_date or backlog are mandatory in one-shot mode","messagePattern":"start_date and end_date or backlog are mandatory in one-shot mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/cloudwatch/config.go","lineNumber":295,"sourceCode":"\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unexpected argument %s\", k)\n\t\t}\n\t}\n\n\ts.logger.Tracef(\"host=%s\", s.Config.GroupName)\n\ts.logger.Tracef(\"stream=%s\", *s.Config.StreamName)\n\ts.Config.GetLogEventsPagesLimit = &def_GetLogEventsPagesLimit\n\n\tif err := s.newClient(ctx); err != nil {\n\t\treturn err\n\t}\n\n\tif s.Config.StreamName == nil || s.Config.GroupName == \"\" {\n\t\treturn errors.New(\"missing stream or group name\")\n\t}\n\n\tif s.Config.StartTime == nil || s.Config.EndTime == nil {\n\t\treturn errors.New(\"start_date and end_date or backlog are mandatory in one-shot mode\")\n\t}\n\n\ts.Config.Mode = configuration.CAT_MODE\n\ts.streamIndexes = make(map[string]string)\n\ts.t = &tomb.Tomb{}\n\n\treturn nil\n}\n","sourceCodeStart":277,"sourceCodeEnd":304,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/cloudwatch/config.go#L277-L304","documentation":"Validation in ConfigureByDSN: the cloudwatch source runs in one-shot (cat) mode, and either StartTime or EndTime is nil. Unlike tail mode, cat mode must know exactly what window to fetch, so a time window (start_date+end_date, or backlog which sets both) is mandatory.","triggerScenarios":"Thrown at pkg/acquisition/modules/cloudwatch/config.go:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add both start_date and end_date parameters to the DSN","Or use backlog=<duration> to define the window relative to now","Switch to tail mode if you want continuous streaming without explicit dates"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}