Unable to access AWS account through terraform AWS provider

0 votes

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?

Dec 16, 2022 in AWS by Roshan
• 300 points

edited 6 days ago 8 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP