我正在使用Lambda Gulp插件上传node-aws-lambda函数,这是由gulp-zip压缩的。这是这个插件的github页面中的lambda_config.js示例:
module.exports = {
accessKeyId: <access key id>, // optional
secretAccessKey: <secret access key>, // optional
profile: <shared credentials profile name>, // optional for loading AWS credientail from custom profile
region: 'us-east-1',
handler: 'index.handler',
role: <role arn>,
functionName: <function name>,
timeout: 10,
memorySize: 128,
runtime: 'nodejs', // default: 'nodejs'
eventSource: {
EventSourceArn: <event source such as kinesis ARN>,
BatchSize: 200,
StartingPosition: "TRIM_HORIZON"
}
}我希望通过将jpeg文件上传到S3存储桶来触发我的Lambda函数。虽然我将这个S3的ARN设置为EventSourceArn,但我没有找到可以设置有效文件(.jpg、.jpeg等)的后缀的位置。并在运行gulp命令时显示错误。
提前谢谢你。
发布于 2016-01-25 20:07:08
在存储桶中,转到“属性”,然后转到“事件”。您可以在此处选择将触发事件的文件的后缀。如果你有几个可能的后缀,我想你只能添加几个规则
https://stackoverflow.com/questions/34992039
复制相似问题