Closed Phani-Thulabhandula closed 4 years ago
Please check IAM user permissions
please provide the access key and secret key and region name in provider or just set an environment variable. example for provider
provider "aws" {
region = "us-west-2"
access_key = "my-access-key"
secret_key = "my-secret-key"
}
example for environment variables
export AWS_ACCESS_KEY_ID="anaccesskey"
export AWS_SECRET_ACCESS_KEY="asecretkey"
export AWS_DEFAULT_REGION="us-west-2"
note: provide your access key, secret key and region.
Im trying to give environment variables. In class we are taught to give them like this in run time. $env:AWS_ACCESS_KEY_ID="." like wise the other two. and in provider.tf provider "aws" { }
and we are following this method.
please check your environment variables once. are you set environment variables permanently or not? please check,the error is related to your aws credentials.