wirejs-deploy-amplify-basic 0.0.83-table-resource → 0.0.85-table-resource
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Duration, CustomResource } from 'aws-cdk-lib';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
+
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
3
4
|
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
4
5
|
import * as cr from 'aws-cdk-lib/custom-resources';
|
|
5
6
|
import { GlobalSecondaryIndexProps } from 'aws-cdk-lib/aws-dynamodb';
|
|
@@ -25,6 +26,16 @@ export class TableIndexes extends Construct {
|
|
|
25
26
|
timeout: Duration.minutes(15),
|
|
26
27
|
});
|
|
27
28
|
|
|
29
|
+
onEvent.addToRolePolicy(new iam.PolicyStatement({
|
|
30
|
+
actions: [
|
|
31
|
+
'dynamodb:UpdateTable',
|
|
32
|
+
'dynamodb:DescribeTable'
|
|
33
|
+
],
|
|
34
|
+
resources: [
|
|
35
|
+
`arn:aws:dynamodb:*:*:table/${props.tableName}`
|
|
36
|
+
],
|
|
37
|
+
}));
|
|
38
|
+
|
|
28
39
|
const provider = new cr.Provider(this, 'TableIndexesProvider', {
|
|
29
40
|
onEventHandler: onEvent,
|
|
30
41
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wirejs-deploy-amplify-basic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85-table-resource",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"recursive-copy": "^2.0.14",
|
|
33
33
|
"rimraf": "^6.0.1",
|
|
34
34
|
"wirejs-dom": "^1.0.38",
|
|
35
|
-
"wirejs-resources": "^0.1.
|
|
35
|
+
"wirejs-resources": "^0.1.53-table-resource"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@aws-amplify/backend": "^1.14.0",
|