title: Terraform settings - remote state s3 - InvalidParameter validation error
body: <h3>Environment</h3>
  
  <p>Terraform v0.12.24
  + provider.aws v2.61.0</p>
  
  <p>Running in an alpine container.</p>
  
  <h3>Background</h3>
  
  <p>I have a basic terraform script running ok, but now I'm extending it and am trying to configure a remote (S3) state.</p>
  
  <p><strong>terraform.tf:</strong></p>
  
  <pre><code>terraform {
    backend "s3" {
      bucket         = "labs"
      key            = "com/company/labs"
      region         = "eu-west-2"
      dynamodb_table = "labs-tf-locks"
      encrypt        = true
    }
  }
  </code></pre>
  
  <p>The bucket exists, and so does the table. I have created them both with terraform and have confirmed through the console. </p>
  
  <h3>Problem</h3>
  
  <p>When I run <code>terraform init</code> I get:</p>
  
  <pre><code>Error refreshing state: InvalidParameter: 2 validation error(s) found.
  - minimum field size of 1, GetObjectInput.Bucket.
  - minimum field size of 1, GetObjectInput.Key.
  </code></pre>
  
  <h3>What I've tried</h3>
  
  <p><code>terraform fmt</code> reports no errors and happily reformats my <code>terraform.tf</code> file. I tried moving the stanza into my <code>main.tf</code> too, just in case the <code>terraform.tf</code> file was being ignored for some reason. I got exactly the same results.</p>
  
  <p>I've also tried running this without the alpine container, from an ubuntu ec2 instance in aws, but I get the same results.</p>
  
  <p>I originally had the name of the terraform file in the key. I've removed that (thanks) but it hasn't helped resolve the problem.</p>
  
  <p>Also, I've just tried running this in an older image: <code>hashicorp/terraform:0.12.17</code> but I get a similar error:</p>
  
  <pre><code>Error: Failed to get existing workspaces: InvalidParameter: 1 validation error(s) found.
  - minimum field size of 1, ListObjectsInput.Bucket.
  </code></pre>
  
  <p>I'm guessing that I've done something trivially stupid here, but I can't see what it is. </p>