【发布时间】:2021-11-14 18:45:46
【问题描述】:
我正在尝试通过引用定义的环境变量来构建 s3 事件应用程序。
在我所指的模板下方
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
CreateThumbnail:
Type: AWS::Serverless::Function
Properties:
Handler: handler
Runtime: runtime
Timeout: 60
Policies: AWSLambdaExecute
Environment:
Variables:
BUCKET_NAME: !Sub "${S3}"
Events:
CreateThumbnailEvent:
Type: S3
Properties:
Bucket: ""How can refer the s3 bucket form the environment here"
Events: s3:ObjectCreated:*
我实际上需要从“环境变量”中引用“BUCKET NAME”,还需要从同一个 s3 添加事件触发器。
有人可以帮忙吗?
谢谢
【问题讨论】:
标签: amazon-s3 aws-lambda aws-sam aws-sam-cli