Here is the full error:
Please see Terraform Registry
│ for more information about providing credentials.
│
│ AWS Error: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded
│
│
│ with provider[“Terraform Registry”],
│ on main.tf line 19, in provider “aws”:
│ 19: provider “aws” {
I simply followed the 8 video AWS tutorial on Terrafon at the Terraform site, and this failure occurred on the 8th video where we are shown how to migrate the local files to Terraform Cloud. The code I pasted here came directly from the instructions provided by Terraform. I hope this helps.