问题标签 [aws-access-policy]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
645 浏览

aws-lambda - How to access aws resources created in other account

In my use case, I want to access DynamoDB table created in AWS account A and Lambda created in account B. For this I have followed many references on Internet which suggests me to use AWS assume role feature. I have added following permission in Lambda execution role

Following is the trust relationship of Lambda

In account A, I have created role(test-db-access) for allowing others to access this account and added AmazonDynamoDBFullAccess and AdministratorAccess policies. Following is the trust relationship I have added in this account

Following is the Java code I have added to access Dynamo DB instance

following is the crash log coming on executing lambda

{ "errorMessage": "User: arn:aws:sts::aws-account-B-number:assumed-role/sam-dev-test-TestLambda-LambdaRole-1FH5IC18J0MYT/sam-dev-test-TestLambda-LambdaFunction-73TVOBN6VXXX is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::aws-account-A-number:role/test-db-access (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied; Request ID: 100bd3a3-3f9c-11ea-b642-d3b4d9ff35de)", "errorType": "com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException" }

0 投票
1 回答
389 浏览

amazon-web-services - 我可以让组织中的所有用户都可以看到 EC2 实例吗?

我有一个组织,我希望一个用户创建 EC2 并且所有其他用户都能够访问它。那可能吗?

0 投票
1 回答
645 浏览

amazon-web-services - How to update aws elasticsearch access policy from serverless.yaml configuration?

I am trying to update AWS elasticsearch access policy through serverless yaml configuration:

On executing command serverless deploy, either execution hung up or terminate with the following error

Also sometimes the command executed without error but there is no change in ES access policy when checked in AWS console.

Am I missing any configuration details for updating the resource? What can be done to update access policy for ES resource using serverless?

0 投票
1 回答
632 浏览

node.js - aws nodejs sdk putObjectAcl 正确语法

我需要分配公共读取访问权限,同时允许所有者在处理 sharp() 库中的对象后以完全访问权限操作对象。因此,我将旧对象替换为新对象,因此我需要设置新的 ACL。ACL 只允许拥有一种访问权限,我需要将“public-read”和“bucket-owner-full-controll”结合起来

根据界面和文档,这就足够了

另外,我试过这个,根据界面应该足够了,但是我得到了错误:

我也试过这种方式,我得到一个错误,我的 XML 格式错误

错误:

MalformedACLError:您提供的 XML 格式不正确或未针对我们发布的架构进行验证

此语法具有精确的所有者:

给出一个错误:

AccessDenied:拒绝访问

另外,我在 PHP 中找到了一个解决方案,但这对我不起作用 - 我被拒绝访问

这是解决方案

这是文档Nodejs 示例

提前致谢!

0 投票
2 回答
3019 浏览

amazon-web-services - aws:SourceAccount 和 aws:SourceOwner AWS SNS 访问策略语句有什么区别

AWS 文档包含不同 SNS 访问控制配置的示例。

有两个类似的配置示例:

一个允许将通知从另一个账户的 S3 存储桶发布到 SNS 主题:

第二允许将通知从另一个帐户的 SES 电子邮件发布到 SNS 主题:

不同之处在于第一个示例使用aws:SourceAccount,第二个示例使用aws:SourceOwner.

该文档有一个名为“ aws:SourceAccount 与 aws:SourceOwner ”的专用段落,但我仍不清楚这两个语句之间的区别。

您能否澄清政策声明aws:SourceAccountaws:SourceOwner政策声明之间的区别?

0 投票
2 回答
1175 浏览

amazon-web-services - 拒绝除一个角色之外的所有角色的 AWS Secrets Manager 资源策略

我在秘密管理器中有一个秘密,并且系统中有多个 IAM 角色。我只想要一个角色来访问这个秘密。不幸的是,还有一些其他 IAM 角色拥有完整的 Secrets Manager 权限。所以我想限制对所有其他角色的秘密访问,除了我想要的角色。

角色

  1. IAM_role_that_need_to_access_the_secret。
  2. IAM_role_1_that_should_not_access_the_secret。
  3. IAM_role_2_that_should_not_access_the_secret。

以下正在工作。

但我想拒绝访问所有角色,而无需在拒绝权限部分明确提及每个角色。像下面的东西。但它将仅限于所有角色,包括所需的角色。

0 投票
1 回答
2800 浏览

amazon-web-services - AWS SNS 主题访问策略不阻止用户订阅

我为 SNS 主题设置了如下所示的访问策略。我以为我只允许user2订阅该主题,但user1可以订阅该主题。我怎样才能为我想做的事情配置这个?

0 投票
0 回答
30 浏览

amazon-web-services - 创建 aws 弹性搜索域后,我应该在哪里获得 kibana 凭据?

我已经设置了一个配置来存储通过 SES 发送的电子邮件。我跟着下面的链接

https://aws.amazon.com/premiumsupport/knowledge-center/ses-email-sending-history/

我面临的问题是,当我打开配置为存储 SES 发送的电子邮件的弹性搜索域时,它要求提供 kibana 凭据。我到处找,但在其他任何地方都找不到。在上面的网址中甚至没有提到任何关于 kibana 凭据的内容。

我正在使用 AWS 免费套餐帐户。

0 投票
0 回答
133 浏览

amazon-web-services - 更改帐户密钥后出现 AWS Lambda 403 禁止错误

不知何故,我的 AWS 访问密钥和秘密访问密钥公开了。我找出了漏洞的来源并修复了它。但是,我仍然需要更改我的访问密钥。因此,我创建了新密钥并使旧密钥无效。

现在我无法编辑、创建或删除我的任何 Lambda 函数。我每次都收到请求 403 错误。我使用的所有其他 AWS 服务(S3、EC2、DynamoDB 等)都运行良好。我什至尝试在停用新键的同时激活旧键,但我仍然遇到问题。

其他人遇到这个问题或有任何想法如何解决这个问题?我检查了 Lambda 上的安全组和权限,我应该可以访问它们,因为我是账户的根用户和整体管理员。

0 投票
1 回答
717 浏览

amazon-web-services - 无法在 Amazon (aws) 上创建/删除/发布 Lambda,收到 403 Access denied

在我的 aws root 帐户上遇到未知问题:

当我尝试通过 aws 站点创建/删除 lambda 时 - 它显示 403 错误。

在此处输入图像描述

几乎相同,尝试删除在 lambdas 之前创建时:

在此处输入图像描述

上次创建 lambda 大约是 2 个月前,大约一个月前我的免费套餐过期了,我收到了电子邮件。但它是如何相关的 - 不知道,一切都应该正常工作,但没有。此外,例如,我可以毫无问题地创建/删除 dynamoDB 表。我在尝试通过 Visual Studio 2019 发布时收到相同的 403,因此无法在那里更新代码。

此外,我的 AWS Personal Health Dashboard 没有显示任何异常。您能否帮助理解这里的问题出在哪里,因为我无法就技术主题联系 aws 支持 - 基本 blan 限制或类似的东西(awhhhhh)。