Tigris S3 as terraform backend seeing InvalidAccessKeyId

Hey, I’m trying to use Tigris S3 as a backend for my Terraform because I really hate using AWS. This works really well locally, but for some reason I’m seeing this error when trying to initialize something that I think is using the AWS SDK.

│ Error: Failed to get existing workspaces: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 1752257176846917340, HostID: , api error InvalidAccessKeyId: The access key ID you provided does not exist in our records.

Initializing the backend...
Failure during /***/home/.tenv/OpenTofu/1.10.2/tofu call : exited with code 1

Here’s how I configured my backend:

  backend "s3" {
    bucket       = "template-terraform-state"
    use_lockfile = true
    endpoints = {
      s3  = "https://t3.storage.dev"
      iam = "https://iam.storage.dev"
    }
    key    = "doppler/state/doppler.tfstate"
    region = "auto"

    access_key = var.terraform_s3_bucket_access_key
    secret_key = var.terraform_s3_bucket_secret_key

    skip_credentials_validation = true
    skip_requesting_account_id  = true
    skip_metadata_api_check     = true
    skip_region_validation      = true
    use_path_style              = true
  }

Everything here works fine running tofu locally, but when I pass all of these into a terrateam.io github actions step, I get the error above. Any thoughts on this? it sounds like the key is passed in, but it’s just not showing up in tigris maybe?

I actually figured out the problem. It was because passing in the environment variables had additional quotation marks that weren’t supposed to be in there. So it’s all fixed now. This works, and I put this into a blog post: Using Tigris S3 Buckets as Terraform Backends - The Loewenthal Corporation