在执行此命令时,我得到以下错误:
C:\WINDOWS\system32>eksctl create cluster --name eksctl-demo --profile myAdmin2
Error: checking AWS STS access – cannot get role ARN for current session: operation error STS: GetCallerIdentity, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request send failed, Get "http://169.254.169.254/latest/meta-data/iam/security-credentials/": dial tcp 169.254.169.254:80: i/o timeoutmyAdmin2 IAM用户可信度设置如下:
凭据文件:
[myAdmin2]
aws_access_key_id = ******************
aws_secret_access_key = ********************配置文件:
[profile myAdmin2]
region = us-east-2
output = jsonmyAdmin2可以访问控制台:
C:\WINDOWS\system32>aws iam list-users --profile myAdmin2
{
"Users": [
{
"Path": "/",
"UserName": "myAdmin",
"UserId": "AIDAYYPFV776ELVEJ5ZVQ",
"Arn": "arn:aws:iam::602313981948:user/myAdmin",
"CreateDate": "2022-09-30T19:08:08+00:00"
},
{
"Path": "/",
"UserName": "myAdmin2",
"UserId": "AIDAYYPFV776LEDK2PCCI",
"Arn": "arn:aws:iam::602313981948:user/myAdmin2",
"CreateDate": "2022-09-30T21:39:33+00:00"
}
]
}我在使用myAdmin时遇到了问题,这就是为什么我创建了一个名为myAdmin2的新IAM用户。myAdmin2被授予AdministratorAccess权限:如图所示
安装了aws cli版本:
C:\WINDOWS\system32>aws --version
aws-cli/2.7.35 Python/3.9.11 Windows/10 exe/AMD64 prompt/off我的环境变量:
C:\WINDOWS\system32>set
AWS_ACCESS_KEY_ID= ***********the same as I have in credentials file
AWS_CONFIG_FILE=~/.aws/config
AWS_DEFAULT_PROFILE=myAdmin2
AWS_DEFAULT_REGION=us-east-2
AWS_PROFILE=myAdmin2
AWS_SECRET_ACCESS_KEY=****************the same as I have in credentials file
AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials我想这些都是我必须提到的。如果有人能帮忙,请。我不能再犯这个错误了!
发布于 2022-10-01 09:28:24
终于成功了!一切都配置良好,我只需重新启动我的笔记本电脑,它就解决了这个问题!
https://stackoverflow.com/questions/73914690
复制相似问题