temporalio/temporal · error
no bucket specified
Error message
no bucket specified
What it means
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.
Source
Thrown at common/archiver/s3store/history_archiver.go:40
"go.temporal.io/server/common/codec"
"go.temporal.io/server/common/config"
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/log/tag"
"go.temporal.io/server/common/metrics"
"go.temporal.io/server/common/persistence"
)
const (
// URIScheme is the scheme for the s3 implementation
URIScheme = "s3"
errEncodeHistory = "failed to encode history batches"
errWriteKey = "failed to write history to s3"
defaultBlobstoreTimeout = time.Minute
targetHistoryBlobSize = 2 * 1024 * 1024 // 2MB
)
var (
errNoBucketSpecified = errors.New("no bucket specified")
errBucketNotExists = errors.New("requested bucket does not exist")
errEmptyAwsRegion = errors.New("empty aws region")
// the retryer is used to check if the error is retryable
awsRetryer aws.Retryer = retry.NewStandard()
)
type (
historyArchiver struct {
executionManager persistence.ExecutionManager
logger log.Logger
metricsHandler metrics.Handler
s3cli S3API
// only set in test code
historyIterator archiver.HistoryIterator
}
getHistoryToken struct {View on GitHub (pinned to bde624efd1)
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.
Example fix
// before
uri, _ := archiver.NewURI("s3:///prod-archive") // errNoBucketSpecified on validate
// after
uri, _ := archiver.NewURI("s3://my-company-temporal/prod-archive") Defensive patterns
Strategy: validation
Validate before calling
u, err := archiver.NewURI("s3://bucket/path")
if err != nil {
return err
}
if u.Hostname() == "" {
return errors.New("s3 archival URI must include a bucket as the host")
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- empty aws region
- unknown archiver scheme
- unable to find archiver config for the given scheme
- requested bucket does not exist
- SearchPrecision is required when searching for a StartTime o
AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01).
Data as JSON: /api/errors/f433010f395e2740.
Report an issue: GitHub.