openai/codex · error · AwsAuthError

failed to build signable request

Error message

failed to build signable request: {0}

What it means

AwsAuthError variant raised when aws-sigv4's signable-request conversion rejects the assembled HTTP request (structurally invalid for signing despite being a valid request). The wrapped SDK error is appended; the fault is in how the request was built, not in credentials or network.

Solutions

  1. Check the wrapped error for the rejected request part and adjust construction (method, URI, headers, body)
  2. Upgrade/align aws-sigv4 versions if the request type is incompatible with the signable builder
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at codex-rs/aws-auth/src/lib.rs:63 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/f6777445f807d76d. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/aws-auth/src/lib.rs:63

    #[error("AWS service name must not be empty")]
    EmptyService,
    #[error("AWS profile must be configured")]
    MissingProfile,
    #[error("AWS SDK config did not resolve a credentials provider")]
    MissingCredentialsProvider,
    #[error("AWS SDK config did not resolve a region")]
    MissingRegion,
    #[error("failed to load AWS profiles: {0}")]
    ProfileLoad(#[from] aws_config::profile::ProfileFileLoadError),
    #[error("failed to load AWS credentials: {0}")]
    Credentials(#[from] aws_credential_types::provider::error::CredentialsError),
    #[error("request URL is not a valid URI: {0}")]
    InvalidUri(#[source] http::uri::InvalidUri),
    #[error("failed to construct HTTP request for signing: {0}")]
    BuildHttpRequest(#[source] http::Error),
    #[error("request contains a non-UTF8 header value: {0}")]
    InvalidHeaderValue(#[source] http::header::ToStrError),
    #[error("failed to build signable request: {0}")]
    SigningRequest(#[source] aws_sigv4::http_request::SigningError),
    #[error("failed to build SigV4 signing params: {0}")]
    SigningParams(String),
    #[error("SigV4 signing failed: {0}")]
    SigningFailure(#[source] aws_sigv4::http_request::SigningError),
}

/// Loaded AWS auth context that can sign outbound HTTP requests.
#[derive(Clone)]
pub struct AwsAuthContext {
    credentials_provider: SharedCredentialsProvider,
    region: String,
    service: String,
}

impl std::fmt::Debug for AwsAuthContext {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.debug_struct("AwsAuthContext")

View on GitHub (pinned to 339751715c)