排查 Amazon Serverless Application Repository 身份和访问的问题 - Amazon Serverless Application Repository
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

排查 Amazon Serverless Application Repository 身份和访问的问题

使用以下信息可帮助您诊断和修复在使用Amazon Serverless Application Repository和 IAM 时可能遇到的常见问题。

我无权在 Amazon Serverless Application Repository 中执行操作

如果 Amazon Web Services Management Console 告诉您,您无权执行某个操作,则必须联系您的管理员寻求帮助。您的管理员是指为您提供用户名和密码的那个人。

mateojackson IAM 用户尝试使用控制台查看有关小组件的详细信息,但不具有serverlessrepo:GetApplication权限时,会发生以下示例错误。

User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: serverlessrepo:GetApplication on resource: my-example-application

在这种情况下,Mateo 请求管理员更新其策略,以允许他使用 serverlessrepo:GetApplication 操作访问 my-example-application 资源。

我无权执行 iam:PassRole

如果您收到一个错误,表明您无权执行 iam:PassRole 操作,则必须更新策略以允许您将角色传递给 Amazon Serverless Application Repository。

有些 Amazon Web Services允许您将现有角色传递到该服务,而不是创建新服务角色或服务相关角色。为此,您必须具有将角色传递到服务的权限。

当名为 marymajor 的 IAM 用户尝试使用控制台在 Amazon Serverless Application Repository 中执行操作时,会发生以下示例错误。但是,服务必须具有服务角色所授予的权限才可执行此操作。Mary 不具有将角色传递到服务的权限。

User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole

在这种情况下,必须更新 Mary 的策略以允许她执行 iam:PassRole 操作。

如果您需要帮助,请联系您的 Amazon 管理员。管理员是向您提供登录凭证的人。

我是管理员并希望允许其他人访问 Amazon Serverless Application Repository

要允许其他人访问 Amazon Serverless Application Repository,您必须为需要访问权限的人员或应用程序创建一个 IAM 实体(用户或角色)。它们将使用该实体的凭证访问 Amazon。然后,您必须将策略附加到实体,以便在 Amazon Serverless Application Repository 中向其授予正确的权限。

要立即开始使用,请参阅 IAM 用户指南中的创建您的第一个 IAM 委派用户和组

我想要允许我的 Amazon 账户之外的用户访问我的 Amazon Serverless Application Repository 资源

您可以创建一个角色,以便其它账户中的用户或您组织外的人员可以使用该角色来访问您的资源。您可以指定谁值得信赖,可以担任角色。对于支持基于资源的策略或访问控制列表 (ACL) 的服务,您可以使用这些策略向人员授予对您的资源的访问权。

要了解更多信息,请参阅以下内容: