大网数据广告活动
服务器运维问答

(AccessDenied) when calling the UploadServerCertificate operation: User xxx is not authorized to perform: iam:UploadServerCertificate

· 52CE 我爱测

the admin added me as IAM user. I created self signed certificates (private key+certificate) and I tried to upload them through creating a new classic load balancer. I've been trying since yesterday to fix this problem .. At firs…

问题原文

原帖链接 · am fs · CC BY-SA 4.0

the admin added me as IAM user. I created self signed certificates (private key+certificate) and I tried to upload them through creating a new classic load balancer.

I've been trying since yesterday to fix this problem .. At first, the admin assigned these permissions to me:

and then, he tried himself adding the certifs to the load balancer and again :

Failed to create load balancer: Server Certificate not found for the key: 
arn:aws:iam::845477561111:server-certificate/mycertificate

And finally, he gave me the admin role in order to be able to add certifs on my own and again, i couldn't upload them because of access denial. I can't understand in what part i did wrong. Aren't IAM users able to create certificates and add them to a load balancer no matter what permissions do they have?

I'll be grateful for any help

已采纳解答

原帖链接 · Matt Houser · CC BY-SA 4.0

Uploading a self-signed certificate is an IAM function. If your IAM user is being denied permission to execute iam:UploadServerCertificate or iam:* (all IAM functions), then you won't be able to upload your certificate.

The AWSCertificateManagerFullAccess IAM Policy will not help you with this. This policy (and all "CertificateManager" policies) are for ACM functions only.

Since your administrator uploaded the certificate for you, you are probably still encountering IAM permission issues trying to create your load balancer. This is because you do not have permissions to "list" the available certificates, thus AWS gives you the new error:

Failed to create load balancer: Server Certificate not found for the key: arn:aws:iam::845477561111:server-certificate/mycertificate

To resolve your issue, your administrator needs to give you permission for the IAM functions. Applying this policy to your user will (hopefully) allow you to assign your certificate to the load balancer:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "iam:GetServerCertificate",
                "iam:UpdateServerCertificate",
                "iam:ListServerCertificates",
                "iam:UploadServerCertificate"
            ],
            "Resource": "*"
        }
    ]
}

If your administrator thinks you should already have these permissions, double check that there isn't another policy that is explicitly denying you IAM permissions.

Also:

Aren't IAM users able to create certificates and add them to a load balancer no matter what permissions do they have?

Absolutely not! You cannot do anything that you have not been granted permissions for.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。