aws-lambda - 您如何访问 AWS Lambda 函数上的 IAM 角色?
问题描述
我正在尝试使用 AWS Lambda,并且对它非常陌生。我实现了 HelloWorld 模板,一切都使用 Pycharm 正确地提升到 AWS。它是导致我出现问题的 ARN 访问。该示例会自动创建一个角色。当我尝试使用它时,我的 template.yaml 没有使用创建的角色,并且我创建的任何角色似乎都没有被访问。
如果有人可以提供帮助,那就太好了。
这是我在我的 template.yaml 上看到的
Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-
model/blob/master/docs/internals/generated_resources.rst#api
ArloEventApi:
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
Value: !Sub "https://${ServerlessRestApi}.execute-
api.${AWS::Region}.amazonaws.com/Prod/ArloEvents/"
ArloEventFunction:
Description: "Arlo Events Lambda Function ARN"
Value: !GetAtt ArloEventFunctionRole.Arn
#!GetAtt HelloWorldFunction.Arn
ArloEventFunctionIamRole:
Description: "Implicit IAM Role created for ArloEvent function"
Value: !GettAtt ArloEventFunctionRole.Arn
#!GetAtt HelloWorldFunctionRole.Arn
解决方案
推荐阅读
- reactjs - Redux 存储在向我的 reducer 发送操作后不更新
- java - 对不同类型的对象具有相同验证规则的 Java 设计类
- javascript - 如何展平嵌套对象?
- ssis - 具有本地 C 驱动器与网络驱动器的 SSIS 包文件
- postgresql - 如何在rails 5中添加具有较低功能的三元组索引
- postgresql - 将 postgres 参数传递到 Kubernetes 部署中
- python - 寻找一种将行组合在一起的方法,以便在 Python/Pandas 中列匹配并且一列的数字大于或等于零
- heroku - DNS 目标和路由问题
- java - 如何将 Project Reactor 的调度程序与基于 Executor 的库一起使用?
- javascript - AJAX - 在一个 onchange 事件中调用两个函数