@flit/cdk-bucket-mesh 0.3.0 → 0.4.0
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flit/cdk-bucket-mesh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "An AWS CDK construct to help setup a multy bucket replication across regions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -46,22 +46,25 @@
|
|
|
46
46
|
],
|
|
47
47
|
"useTabs": true
|
|
48
48
|
},
|
|
49
|
+
"overrides": {
|
|
50
|
+
"glob": "^13.0.1"
|
|
51
|
+
},
|
|
49
52
|
"devDependencies": {
|
|
50
53
|
"@aws-cdk/aws-lambda-go-alpha": "^2.233.0-alpha.0",
|
|
51
|
-
"@types/node": "^25.
|
|
54
|
+
"@types/node": "^25.2.2",
|
|
52
55
|
"aws-cdk-lib": "^2.233.0",
|
|
53
|
-
"constructs": "^10.4.
|
|
56
|
+
"constructs": "^10.4.0",
|
|
54
57
|
"jest": "^30.2.0",
|
|
55
|
-
"jsii": "^5.9.
|
|
56
|
-
"jsii-pacmak": "^1.
|
|
57
|
-
"prettier": "^3.
|
|
58
|
-
"prettier-plugin-packagejson": "^
|
|
58
|
+
"jsii": "^5.9.26",
|
|
59
|
+
"jsii-pacmak": "^1.126.0",
|
|
60
|
+
"prettier": "^3.8.1",
|
|
61
|
+
"prettier-plugin-packagejson": "^3.0.0",
|
|
59
62
|
"ts-jest": "^29.4.6",
|
|
60
63
|
"typescript": "^5.9.3"
|
|
61
64
|
},
|
|
62
65
|
"peerDependencies": {
|
|
63
66
|
"aws-cdk-lib": "^2.233.0",
|
|
64
|
-
"constructs": "^10.4.
|
|
67
|
+
"constructs": "^10.4.0"
|
|
65
68
|
},
|
|
66
69
|
"publishConfig": {
|
|
67
70
|
"access": "public"
|
|
@@ -15,15 +15,16 @@ import (
|
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
type Bucket struct {
|
|
18
|
-
name
|
|
19
|
-
region
|
|
18
|
+
name string
|
|
19
|
+
region string
|
|
20
|
+
accountId string
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
func handleRequest(ctx context.Context, event cfn.Event) (cfn.Response, error) {
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
if
|
|
26
|
-
|
|
25
|
+
physicalResourceId := event.PhysicalResourceID
|
|
26
|
+
if physicalResourceId == "" {
|
|
27
|
+
physicalResourceId = "BucketMeshReplication"
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
replicationRoleArn := event.ResourceProperties["replicationRoleArn"].(string)
|
|
@@ -63,7 +64,7 @@ func handleRequest(ctx context.Context, event cfn.Event) (cfn.Response, error) {
|
|
|
63
64
|
StackID: event.StackID,
|
|
64
65
|
RequestID: event.RequestID,
|
|
65
66
|
LogicalResourceID: event.LogicalResourceID,
|
|
66
|
-
PhysicalResourceID:
|
|
67
|
+
PhysicalResourceID: physicalResourceId,
|
|
67
68
|
Data: map[string]any{},
|
|
68
69
|
}, nil
|
|
69
70
|
}
|
|
@@ -88,7 +89,8 @@ func handleRequest(ctx context.Context, event cfn.Event) (cfn.Response, error) {
|
|
|
88
89
|
Prefix: aws.String(""),
|
|
89
90
|
},
|
|
90
91
|
Destination: &types.Destination{
|
|
91
|
-
Bucket:
|
|
92
|
+
Bucket: aws.String("arn:aws:s3:::" + dstBucket.name),
|
|
93
|
+
Account: aws.String(dstBucket.accountId),
|
|
92
94
|
AccessControlTranslation: &types.AccessControlTranslation{
|
|
93
95
|
Owner: types.OwnerOverrideDestination,
|
|
94
96
|
},
|
|
@@ -131,7 +133,7 @@ func handleRequest(ctx context.Context, event cfn.Event) (cfn.Response, error) {
|
|
|
131
133
|
StackID: event.StackID,
|
|
132
134
|
RequestID: event.RequestID,
|
|
133
135
|
LogicalResourceID: event.LogicalResourceID,
|
|
134
|
-
PhysicalResourceID:
|
|
136
|
+
PhysicalResourceID: physicalResourceId,
|
|
135
137
|
Data: map[string]any{},
|
|
136
138
|
}, nil
|
|
137
139
|
|
|
@@ -165,7 +167,7 @@ func handleRequest(ctx context.Context, event cfn.Event) (cfn.Response, error) {
|
|
|
165
167
|
StackID: event.StackID,
|
|
166
168
|
RequestID: event.RequestID,
|
|
167
169
|
LogicalResourceID: event.LogicalResourceID,
|
|
168
|
-
PhysicalResourceID:
|
|
170
|
+
PhysicalResourceID: physicalResourceId,
|
|
169
171
|
Data: map[string]any{},
|
|
170
172
|
}, nil
|
|
171
173
|
|
package/src/bucket-mesh/index.ts
CHANGED