[SOLVED] error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS

In case someone else falls into the same issue.
I was getting the next error during this lab


│ Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.
│ 
│ Please see https://registry.terraform.io/providers/hashicorp/aws
│ for more information about providing credentials.
│ 
│ Error: failed to refresh cached credentials, no EC2 IMDS role found...

As mentioned by the instructions I had the corresponding env variables set in the lab console
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION

At the end I had to setup those env variables within TFC to make it work.

The infrastructure was deployed too us-east-1 though (I had a different region set in AWS_DEFAULT_REGION)

Hello @aw0,
Thanks for sharing!