@projectdochelp/s3te 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -81,7 +81,7 @@ function buildFunctionNames(runtimeConfig) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
function createExecutionRole(roleName) {
|
|
84
|
+
function createExecutionRole(roleName, extraStatements = []) {
|
|
85
85
|
return {
|
|
86
86
|
Type: "AWS::IAM::Role",
|
|
87
87
|
Properties: {
|
|
@@ -128,7 +128,8 @@ function createExecutionRole(roleName) {
|
|
|
128
128
|
"cloudfront:CreateInvalidation"
|
|
129
129
|
],
|
|
130
130
|
Resource: "*"
|
|
131
|
-
}
|
|
131
|
+
},
|
|
132
|
+
...extraStatements
|
|
132
133
|
]
|
|
133
134
|
}
|
|
134
135
|
}
|
|
@@ -599,7 +600,24 @@ export function buildWebinyCloudFormationTemplate({ config, environment }) {
|
|
|
599
600
|
}
|
|
600
601
|
},
|
|
601
602
|
Resources: {
|
|
602
|
-
ExecutionRole: createExecutionRole(`${runtimeConfig.stackPrefix}_s3te_webiny_lambda_runtime
|
|
603
|
+
ExecutionRole: createExecutionRole(`${runtimeConfig.stackPrefix}_s3te_webiny_lambda_runtime`, [
|
|
604
|
+
{
|
|
605
|
+
Effect: "Allow",
|
|
606
|
+
Action: [
|
|
607
|
+
"dynamodb:DescribeStream",
|
|
608
|
+
"dynamodb:GetRecords",
|
|
609
|
+
"dynamodb:GetShardIterator"
|
|
610
|
+
],
|
|
611
|
+
Resource: { Ref: "WebinySourceTableStreamArn" }
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
Effect: "Allow",
|
|
615
|
+
Action: [
|
|
616
|
+
"dynamodb:ListStreams"
|
|
617
|
+
],
|
|
618
|
+
Resource: "*"
|
|
619
|
+
}
|
|
620
|
+
]),
|
|
603
621
|
ContentMirror: lambdaRuntimeProperties(
|
|
604
622
|
runtimeConfig,
|
|
605
623
|
"ExecutionRole",
|