[英]AWS Lambda can't reach resources created from MobileHub
I am having an issue accessing resources created in MobileHub from Lambda and that does not make sense for me at all.. I have two questions (maybe it is the same question..):我在从Lambda访问MobileHub 中创建的资源时遇到问题,这对我来说根本没有意义..我有两个问题(也许是同一个问题..):
Why lambda can't access all resources created by MobileHub when it has fullAccess permissions to those specific resources?当 lambda 对这些特定资源具有完全访问权限时,为什么它无法访问 MobileHub 创建的所有资源? I mean, if I create those resources separately I can access them but not created ones from MobileHub..我的意思是,如果我单独创建这些资源,我可以访问它们,但不能访问从 MobileHub 创建的资源。
Is there a way to grant access to these resources or am I missing something?有没有办法授予对这些资源的访问权限,或者我错过了什么?
Update更新
The issue was VPC .问题是VPC 。 Basically when I enabled VPC on lambdas to reach rds which have no public access I couldn't reach any other resources, when I disabled it - RDS was unreachable.基本上,当我在 lambdas 上启用 VPC 以访问没有公共访问权限的 rds 时,我无法访问任何其他资源,当我禁用它时 - RDS 无法访问。 The question is how to combine vpc with role policies?问题是如何将 vpc 与角色策略结合起来?
You can find the resources associated with your project using the left-side navigation in the Mobile Hub console and select "Resources."您可以使用 Mobile Hub 控制台中的左侧导航找到与您的项目关联的资源,然后选择“资源”。 If you want to enable your AWS Lambda functions to be able to make use of any AWS resources, then you'll need to add an appropriate IAM Policy to the Lambda Execute IAM Role.如果您希望您的 AWS Lambda 函数能够使用任何 AWS 资源,那么您需要向 Lambda 执行 IAM 角色添加适当的 IAM 策略。 You can find this role in your project on the "Resources" page under "AWS Identity and Access Management Roles."您可以在“AWS Identity and Access Management Roles”下的“Resources”页面上的项目中找到此角色。 It is the role that has "lambdaexecutionrole" in the name.它是名称中带有“lambdaexecutionrole”的角色。 Select this role then attach whatever policies you like in the IAM (Identity and Access Management) console.选择此角色,然后在 IAM(身份和访问管理)控制台中附加您喜欢的任何策略。
For more information on how to attach roles to polices, see:有关如何将角色附加到策略的更多信息,请参阅:
http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_modify.html http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_modify.html
And, if you have further problems, you can get help from the AWS community in the forums, here:而且,如果您有进一步的问题,您可以在论坛中从 AWS 社区获得帮助,这里:
https://forums.aws.amazon.com/forum.jspa?forumID=88 https://forums.aws.amazon.com/forum.jspa?forumID=88
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.