小编RAV*_*HIT的帖子

AWS 地形:?错误:配置 Terraform AWS 提供商时出错:验证提供商凭证时出错:调用 sts:GetCallerIdentity 时出错:

错误:配置 Terraform AWS 提供商时出错:

验证提供程序凭据时出错:调用 sts:GetCallerIdentity 时出错:操作错误 STS:GetCallerIdentity,https 响应错误 StatusCode:403,RequestID:95e52463-8cd7-038-b924-3a5d4ad6ef03,api 错误 InvalidClientTokenId:请求中包含的安全令牌无效。与提供者[“registry.terraform.io/hashicorp/aws”],在provider.tf第1行,在提供者“aws”中:1:提供者“aws”{

我只有两个文件。

  1. 实例.tf
resource "aws_instance" "web" {
  ami           = "ami-068257025f72f470d"
  instance_type = "t2.micro"
    
  tags = {
    Name = "instance_using_terraform"
  }
}
Run Code Online (Sandbox Code Playgroud)
  1. 提供商.tf
provider "aws" {
  region = "ap-east-1"
  access_key = "xxxx"
  secret_key = "xxxx/xxx+xxx"
}
Run Code Online (Sandbox Code Playgroud)

错误图片在这里

amazon-ec2 amazon-web-services terraform terraform-provider-aws

9
推荐指数
2
解决办法
3万
查看次数