{"record":{"id":"f433010f395e2740","repo":"temporalio/temporal","slug":"no-bucket-specified","errorCode":null,"errorMessage":"no bucket specified","messagePattern":"no bucket specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/archiver/s3store/history_archiver.go","lineNumber":40,"sourceCode":"\t\"go.temporal.io/server/common/codec\"\n\t\"go.temporal.io/server/common/config\"\n\t\"go.temporal.io/server/common/log\"\n\t\"go.temporal.io/server/common/log/tag\"\n\t\"go.temporal.io/server/common/metrics\"\n\t\"go.temporal.io/server/common/persistence\"\n)\n\nconst (\n\t// URIScheme is the scheme for the s3 implementation\n\tURIScheme               = \"s3\"\n\terrEncodeHistory        = \"failed to encode history batches\"\n\terrWriteKey             = \"failed to write history to s3\"\n\tdefaultBlobstoreTimeout = time.Minute\n\ttargetHistoryBlobSize   = 2 * 1024 * 1024 // 2MB\n)\n\nvar (\n\terrNoBucketSpecified = errors.New(\"no bucket specified\")\n\terrBucketNotExists   = errors.New(\"requested bucket does not exist\")\n\terrEmptyAwsRegion    = errors.New(\"empty aws region\")\n\n\t// the retryer is used to check if the error is retryable\n\tawsRetryer aws.Retryer = retry.NewStandard()\n)\n\ntype (\n\thistoryArchiver struct {\n\t\texecutionManager persistence.ExecutionManager\n\t\tlogger           log.Logger\n\t\tmetricsHandler   metrics.Handler\n\t\ts3cli            S3API\n\t\t// only set in test code\n\t\thistoryIterator archiver.HistoryIterator\n\t}\n\n\tgetHistoryToken struct {","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/archiver/s3store/history_archiver.go#L22-L58","documentation":"errNoBucketSpecified is an unexported sentinel in common/archiver/s3store returned by SoftValidateURI/ValidateURI when an s3:// archival URI has no host (bucket) component. The S3 archiver requires URIs of the form s3://<bucket>/[path]; without a bucket it cannot address any object, so URI validation fails before any AWS call.","triggerScenarios":"Archiving or reading history with a URI like \"s3:///path/to/dir\" or \"s3://\" — URI.Hostname() is empty, so validateURI returns errNoBucketSpecified. Surfaces via historyArchiver.Archive (SoftValidateURI), historyArchiver.Get, and historyArchiver.ValidateURI (which the namespace archival setup calls).","commonSituations":"Misconfigured namespace default URI missing the bucket; URI constructed programmatically by string concatenation that drops the host; empty bucket field in config templating; also relevant for custom S3-compatible endpoints where path-style addressing still requires a bucket name.","solutions":["Fix the namespace archival URI to include the bucket: s3://my-bucket/temporal-archives.","Validate URIs early with archiver.ValidateURI on startup/namespace registration so the misconfiguration is caught before archival runs.","If building URIs in code, use the archiver package's URI parser and check Hostname() is non-empty before use.","For path-style S3-compatible stores, still set the bucket as the URI host."],"exampleFix":"// before\nuri, _ := archiver.NewURI(\"s3:///prod-archive\") // errNoBucketSpecified on validate\n\n// after\nuri, _ := archiver.NewURI(\"s3://my-company-temporal/prod-archive\")","handlingStrategy":"validation","validationCode":"u, err := archiver.NewURI(\"s3://bucket/path\")\nif err != nil {\n\treturn err\n}\nif u.Hostname() == \"\" {\n\treturn errors.New(\"s3 archival URI must include a bucket as the host\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always format s3 archival URIs as s3://<bucket>/<prefix> — never drop the host.","Run archiver.ValidateURI at namespace registration time, before the first archival request.","If assembling URIs from config values, check the bucket field is non-empty during config validation."],"tags":["archival","s3","uri-validation","configuration"],"backgroundTag":"invalid-archival-uri","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}