@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.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.0.3",
54
+ "@types/node": "^25.2.2",
52
55
  "aws-cdk-lib": "^2.233.0",
53
- "constructs": "^10.4.4",
56
+ "constructs": "^10.4.0",
54
57
  "jest": "^30.2.0",
55
- "jsii": "^5.9.20",
56
- "jsii-pacmak": "^1.122.0",
57
- "prettier": "^3.7.4",
58
- "prettier-plugin-packagejson": "^2.5.20",
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.4"
67
+ "constructs": "^10.4.0"
65
68
  },
66
69
  "publishConfig": {
67
70
  "access": "public"
@@ -1,6 +1,6 @@
1
1
  module feature
2
2
 
3
- go 1.24.0
3
+ go 1.25
4
4
 
5
5
  require (
6
6
  github.com/aws/aws-lambda-go v1.51.1
@@ -15,15 +15,16 @@ import (
15
15
  )
16
16
 
17
17
  type Bucket struct {
18
- name string
19
- region string
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
- physicalResourceID := event.PhysicalResourceID
25
- if physicalResourceID == "" {
26
- physicalResourceID = "BucketMeshReplication"
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: 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: aws.String("arn:aws:s3:::" + dstBucket.name),
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: 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: physicalResourceID,
170
+ PhysicalResourceID: physicalResourceId,
169
171
  Data: map[string]any{},
170
172
  }, nil
171
173
 
@@ -24,6 +24,7 @@ class BucketMeshResource extends CustomResource {
24
24
  buckets: props.buckets.map((b) => ({
25
25
  name: b.bucketName,
26
26
  region: Stack.of(b).region,
27
+ accountId: Stack.of(b).account,
27
28
  })),
28
29
  replicationRoleArn: props.role.roleArn,
29
30
  },