{"record":{"id":"29be8dd086a670e9","repo":"projectdiscovery/nuclei","slug":"aws-region-cannot-be-empty","errorCode":null,"errorMessage":"aws region cannot be empty","messagePattern":"aws region cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/http/signer/aws-sign.go","lineNumber":36,"sourceCode":")\n\nconst defaultEmptyPayloadHash = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n\n// AWSOptions\ntype AWSOptions struct {\n\tAwsID          string\n\tAwsSecretToken string\n\tService        string\n\tRegion         string\n}\n\n// Validate Signature Arguments\nfunc (a *AWSOptions) Validate() error {\n\tif a.Service == \"\" {\n\t\treturn errors.New(\"aws service cannot be empty\")\n\t}\n\tif a.Region == \"\" {\n\t\treturn errors.New(\"aws region cannot be empty\")\n\t}\n\n\treturn nil\n}\n\n// AWS v4 signer\ntype AWSSigner struct {\n\tcreds   *aws.Credentials\n\tsigner  *v4.Signer\n\toptions *AWSOptions\n}\n\n// SignHTTP\nfunc (a *AWSSigner) SignHTTP(ctx context.Context, request *http.Request) error {\n\tif region, ok := ctx.Value(SignerArg(\"region\")).(string); ok && region != \"\" {\n\t\ta.options.Region = region\n\t}\n\tif service, ok := ctx.Value(SignerArg(\"service\")).(string); ok && service != \"\" {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/http/signer/aws-sign.go#L18-L54","documentation":"Error \"aws region cannot be empty\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/protocols/http/signer/aws-sign.go:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}