nebari: [bug] Unable to Deploy to AWS

Describe the bug

I’m getting the following error:

error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.

Reproducible Example:

export GITHUB_USERNAME=“”
export GITHUB_TOKEN=“”
export AWS_ACCESS_KEY_ID=“”
export AWS_SECRET_ACCESS_KEY=“”
export CLOUDFLARE_TOKEN=“”

qhub init aws

qhub deploy -c qhub-config.yaml --dns-provider cloudflare --dns-auto-provision

Full Error:

INFO:qhub.provider.terraform:terraform init took 21.004 [s]
INFO:qhub.provider.terraform:rm local state file terraform.tfstate directory=terraform-state
INFO:qhub.provider.terraform:terraform import directory=terraform-state addr=module.terraform-state.aws_s3_bucket.terraform-state id=daskhub-dev-terraform-state
INFO:qhub.provider.terraform: terraform at /var/folders/wf/_b6z5_fx7gb71f96vy026vrr0000gn/T/terraform/0.14.9/terraform
[terraform]: 
[terraform]: Error: error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
[terraform]: 	status code: 403, request id: a28c0f32-1283-4e05-a0a1-0da3df0fa985
[terraform]: 
[terraform]:   on /Users/rhun/PycharmProjects/qhub-test/terraform-state/main.tf line 1, in provider "aws":
[terraform]:    1: provider "aws" {
[terraform]: 
[terraform]: 
INFO:qhub.provider.terraform:terraform apply directory=terraform-state targets=[]
INFO:qhub.provider.terraform: terraform at /var/folders/wf/_b6z5_fx7gb71f96vy026vrr0000gn/T/terraform/0.14.9/terraform
[terraform]: 
[terraform]: Error: error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
[terraform]: 	status code: 403, request id: 29ddaf82-5d11-42dc-b967-574896af8b7b
[terraform]: 
[terraform]:   on main.tf line 1, in provider "aws":
[terraform]:    1: provider "aws" {
[terraform]: 
[terraform]: 

Problem encountered: Terraform error

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

Hi @iameskild - I think it worked.

[terraform]: Apply complete! Resources: 13 added, 0 changed, 0 destroyed.
[terraform]: 
[terraform]: Outputs:
[terraform]: 
[terraform]: ingress_jupyter = {
[terraform]:   "hostname" = "ae31d3aa0eb8c47e39c32ef11b930409-822851141.us-west-2.elb.amazonaws.com"
[terraform]:   "ip" = ""
[terraform]: }
INFO:qhub.provider.terraform:terraform apply took 42.044 [s]
INFO:qhub.provider.terraform:terraform=/var/folders/wf/_b6z5_fx7gb71f96vy026vrr0000gn/T/terraform/0.14.9/terraform output directory=infrastructure
INFO:qhub.provider.terraform:terraform output took 3.648 [s]
Take IP Address ae31d3aa0eb8c47e39c32ef11b930409-822851141.us-west-2.elb.amazonaws.com and update DNS to point to "rhun.ca"

I have just deployed a Qhub 0.3.12 on AWS and didn’t encounter this issue.

@rileyhun We have automated tests set up to run regularly which is why I’m surprised this isn’t working for you. It does look like you may be using different quote characters. You seem to be using “ ” while we would normally use " " instead. Could you try to use the different quote characters and see if that works?