代码拉取完成,页面将自动刷新
Add policies and/or roles to allow cross-account access to your functions.
serverless.yml
service: sample
plugins:
- serverless-plugin-lambda-account-access
provider:
access:
groups:
api: # group has both role and policy access configured
role:
- name: sample-${self:custom.stage}-lambda-api-${self:custom.region}
principals: # can be defined as a single value or an array
- 222222222222 # principal as accountId
- 'arn:aws:iam::333333333333:root' # principal as ARN
- Fn::Import: cloudformation-output-arn-2 # principal as CloudFormation Output Value ARN
policy:
principals:
- 111111111111
- 'arn:aws:iam::222222222222:root'
- Fn::Import: cloudformation-output-arn
other:
policy:
principals: 333333333333
functions:
function1: # access is not allowed
function2:
allowAccess: api # allow access for principals specified in api group only
function3:
allowAccess: # allow access for principals specified in both api and other
- api
- other
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。