title: AWS access key id provided does not exist in our records
body: <p>I've an issue with terraform that i really don't understand.</p>
  <p>Let me explain :
  When i run</p>
  <ul>
  <li>terraform init     all good</li>
  <li>terraform fmt      all good</li>
  <li>terraform validate all good</li>
  </ul>
  <p>However when i run terraform plan i get an ERROR
  <a href="https://i.stack.imgur.com/JITs4.png" rel="nofollow noreferrer">terraform plan </a></p>
  <p>I set the <strong>AWS_ACCESS_KEY</strong> &amp; <strong>AWS_SECRET_key</strong> on the code to test it faster ( otherwise the value are passed by gitlab )</p>
  <p>If i try <strong>without them</strong> on the <strong>variable.tf</strong> and <strong>use</strong> the <strong>value i export before</strong> to use <strong>AWS CLI</strong> everything work perfecty and i can deploy on aws .</p>
  <p><strong>variable.tf</strong></p>
  <pre><code>    variable &quot;aws_region&quot; {
    default = &quot;eu-central-1&quot;
  }
  
  variable &quot;bucket_name&quot; {
    type    = string
    default = &quot;test-bucket&quot;
  }
  
  variable &quot;aws_access_key&quot; {
    default = &quot;XXXXXXXXXXXXXXXXX&quot;
  }
  
  variable &quot;aws_secret_key&quot; {
    default = &quot;XXXXXXXXXXXXXX&quot;
  }
  </code></pre>
  <p><strong>main.tf</strong></p>
  <pre><code>terraform {
    required_providers {
      aws = {
        source  = &quot;hashicorp/aws&quot;
        version = &quot;~&gt; 4.9.0&quot;
      }
    }
  }
  provider &quot;aws&quot; {
    region     = var.aws_region
    access_key = var.aws_access_key
    secret_key = var.aws_secret_key
  
    # Make faster by skipping something
    # https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_get_ec2_platforms
    skip_get_ec2_platforms      = true
    skip_metadata_api_check     = true
    skip_region_validation      = true
    skip_credentials_validation = true
    skip_requesting_account_id  = true
  }
  </code></pre>
  <p><strong>provider.tf</strong></p>
  <pre><code>module &quot;s3-bucket&quot; {
    source  = &quot;terraform-aws-modules/s3-bucket/aws&quot;
    version = &quot;3.4.0&quot;
  
    bucket        = var.bucket_name
    acl           = &quot;private&quot;
    force_destroy = true
    create_bucket = true
    versioning = {
      enabled = true
    }
  
    server_side_encryption_configuration = {
      rule = {
        apply_server_side_encryption_by_default = {
          sse_algorithm = &quot;AES256&quot;
        }
      }
    }
  }
  </code></pre>
  <p>Thanks for your help guy .
  I don't know what to do anymore</p>