I am getting error code 401
"creating ec2 instance: authfailure: aws was not able to validate the provided access credentials │ status code: 401, request id: d103063f-0b26-4b84-9719-886e62b0e2b1"
This is my code
resource "aws_instance" "test-EC2" {
instance_type = "t2.micro"
ami = "ami-07ffb2f4d65357b42"
}
I'm trying to figure out how to create and delete tokens using the AWS management console. I am learning about the Terraform AWS provider, which needs a token, an access key, and a secret key. But the above code isn't working. What to do?