From e16f271e8a9179a08434c393f5503f11d3917526 Mon Sep 17 00:00:00 2001 From: Pavel Denisjuk Date: Tue, 14 Jul 2020 09:36:49 +0200 Subject: [PATCH] fix(cwp-templates): use bucket name as StatementId instead of a hardcoded value --- packages/cwp-template-cms/template/api/resources.js | 2 +- packages/cwp-template-full/template/api/resources.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cwp-template-cms/template/api/resources.js b/packages/cwp-template-cms/template/api/resources.js index 7af33f70170..76db057d5e1 100644 --- a/packages/cwp-template-cms/template/api/resources.js +++ b/packages/cwp-template-cms/template/api/resources.js @@ -220,7 +220,7 @@ module.exports = () => ({ { Action: "lambda:InvokeFunction", Principal: "s3.amazonaws.com", - StatementId: "s3invoke", + StatementId: process.env.S3_BUCKET, SourceArn: `arn:aws:s3:::${process.env.S3_BUCKET}` } ], diff --git a/packages/cwp-template-full/template/api/resources.js b/packages/cwp-template-full/template/api/resources.js index 18a91717d28..b7f0999169e 100644 --- a/packages/cwp-template-full/template/api/resources.js +++ b/packages/cwp-template-full/template/api/resources.js @@ -222,7 +222,7 @@ module.exports = () => ({ { Action: "lambda:InvokeFunction", Principal: "s3.amazonaws.com", - StatementId: "s3invoke", + StatementId: process.env.S3_BUCKET, SourceArn: `arn:aws:s3:::${process.env.S3_BUCKET}` } ],