@aligent/aws-wrappers 0.5.6 → 0.5.8

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.
Files changed (49) hide show
  1. package/README.md +21 -4
  2. package/cjs/index.cjs +192 -152
  3. package/cjs/package.json +14 -14
  4. package/cjs/src/dynamodb/dynamodb.d.ts.map +1 -1
  5. package/cjs/src/index.d.ts +1 -0
  6. package/cjs/src/index.d.ts.map +1 -1
  7. package/cjs/src/s3/s3.d.ts +26 -4
  8. package/cjs/src/s3/s3.d.ts.map +1 -1
  9. package/cjs/src/scheduler/scheduler.d.ts.map +1 -1
  10. package/cjs/src/sns/sns.d.ts +7 -0
  11. package/cjs/src/sns/sns.d.ts.map +1 -1
  12. package/cjs/src/sqs/sqs.d.ts +0 -7
  13. package/cjs/src/sqs/sqs.d.ts.map +1 -1
  14. package/cjs/src/util/batch-operation-error.d.ts +45 -5
  15. package/cjs/src/util/batch-operation-error.d.ts.map +1 -1
  16. package/cjs/src/util/redact.d.ts +17 -18
  17. package/cjs/src/util/redact.d.ts.map +1 -1
  18. package/docs/index/classes/APIGatewayService.md +6 -6
  19. package/docs/index/classes/APIGatewayV2Service.md +5 -5
  20. package/docs/index/classes/BatchOperationError.md +9 -6
  21. package/docs/index/classes/DynamoDBService.md +34 -12
  22. package/docs/index/classes/S3Service.md +42 -19
  23. package/docs/index/classes/SNSService.md +10 -4
  24. package/docs/index/classes/SQSService.md +7 -7
  25. package/docs/index/classes/SSMService.md +9 -7
  26. package/docs/index/classes/SchedulerService.md +11 -11
  27. package/docs/index/classes/SecretsManagerService.md +10 -8
  28. package/docs/index/classes/StepFunctionsService.md +6 -6
  29. package/docs/index/interfaces/BatchFailedEntry.md +5 -5
  30. package/docs/index/interfaces/EmptyBucketPageResult.md +23 -0
  31. package/docs/index/modules.md +1 -0
  32. package/docs/testing/testing/functions/createMockService.md +5 -1
  33. package/esm/index.mjs +192 -152
  34. package/esm/package.json +14 -14
  35. package/esm/src/dynamodb/dynamodb.d.ts.map +1 -1
  36. package/esm/src/index.d.ts +1 -0
  37. package/esm/src/index.d.ts.map +1 -1
  38. package/esm/src/s3/s3.d.ts +26 -4
  39. package/esm/src/s3/s3.d.ts.map +1 -1
  40. package/esm/src/scheduler/scheduler.d.ts.map +1 -1
  41. package/esm/src/sns/sns.d.ts +7 -0
  42. package/esm/src/sns/sns.d.ts.map +1 -1
  43. package/esm/src/sqs/sqs.d.ts +0 -7
  44. package/esm/src/sqs/sqs.d.ts.map +1 -1
  45. package/esm/src/util/batch-operation-error.d.ts +45 -5
  46. package/esm/src/util/batch-operation-error.d.ts.map +1 -1
  47. package/esm/src/util/redact.d.ts +17 -18
  48. package/esm/src/util/redact.d.ts.map +1 -1
  49. package/package.json +14 -14
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: DynamoDBService
8
8
 
9
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:155](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L155)
9
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:166](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L166)
10
10
 
11
11
  Wrapper around the AWS DynamoDB Document client providing structured
12
12
  Powertools logging and X-Ray tracing by default.
@@ -26,7 +26,7 @@ callers work with plain TypeScript objects in both directions.
26
26
 
27
27
  > **new DynamoDBService**(`opts?`): `DynamoDBService`
28
28
 
29
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:168](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L168)
29
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:179](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L179)
30
30
 
31
31
  #### Parameters
32
32
 
@@ -61,7 +61,7 @@ which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
61
61
 
62
62
  > **batchGet**(`input`): `Promise`\<`BatchGetCommandOutput`\>
63
63
 
64
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:322](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L322)
64
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:317](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L317)
65
65
 
66
66
  Batch-get items from one or more DynamoDB tables, retrying
67
67
  `UnprocessedKeys` with jittered exponential backoff. Up to 5 attempts
@@ -91,7 +91,7 @@ Callers should narrow the result type at the call site.
91
91
 
92
92
  > **batchWrite**(`input`): `Promise`\<`BatchWriteCommandOutput`\>
93
93
 
94
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:359](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L359)
94
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:349](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L349)
95
95
 
96
96
  Batch-write items to DynamoDB, retrying `UnprocessedItems` with jittered
97
97
  exponential backoff. Up to 5 attempts (200ms base delay). Throws when
@@ -115,19 +115,23 @@ items remain unprocessed after the final attempt.
115
115
 
116
116
  > **deleteItem**\<`K`, `R`\>(`input`): `Promise`\<`Omit`\<`DeleteCommandOutput`, `"Attributes"`\> & `object`\>
117
117
 
118
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:249](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L249)
118
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:248](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L248)
119
119
 
120
120
  Delete an item from DynamoDB. The `Attributes` field on the response is
121
121
  typed as `R` — relevant when `ReturnValues: 'ALL_OLD'` is set.
122
122
 
123
123
  #### Type Parameters
124
124
 
125
+ <a id="k"></a>
126
+
125
127
  ##### K
126
128
 
127
129
  `K` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
128
130
 
129
131
  Shape of the partition / sort key.
130
132
 
133
+ <a id="r"></a>
134
+
131
135
  ##### R
132
136
 
133
137
  `R` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -152,18 +156,22 @@ Expected shape of the returned `Attributes`.
152
156
 
153
157
  > **getItem**\<`K`, `R`\>(`input`): `Promise`\<`R` \| `undefined`\>
154
158
 
155
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:183](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L183)
159
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:194](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L194)
156
160
 
157
161
  Get an item from DynamoDB.
158
162
 
159
163
  #### Type Parameters
160
164
 
165
+ <a id="k-1"></a>
166
+
161
167
  ##### K
162
168
 
163
169
  `K` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
164
170
 
165
171
  Shape of the partition / sort key.
166
172
 
173
+ <a id="r-1"></a>
174
+
167
175
  ##### R
168
176
 
169
177
  `R` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -190,7 +198,7 @@ The item, or `undefined` if not found.
190
198
 
191
199
  > **paginateItems**\<`T`\>(`input`): `AsyncGenerator`\<`T`\>
192
200
 
193
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:410](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L410)
201
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:395](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L395)
194
202
 
195
203
  Paginate over Query results, yielding one unmarshalled item at a time.
196
204
 
@@ -217,6 +225,8 @@ walk.
217
225
 
218
226
  #### Type Parameters
219
227
 
228
+ <a id="t"></a>
229
+
220
230
  ##### T
221
231
 
222
232
  `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -241,7 +251,7 @@ Expected shape of each yielded item.
241
251
 
242
252
  > **paginateScan**\<`T`\>(`input`): `AsyncGenerator`\<`T`\>
243
253
 
244
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:432](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L432)
254
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:417](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L417)
245
255
 
246
256
  Paginate over Scan results, yielding one unmarshalled item at a time.
247
257
 
@@ -251,6 +261,8 @@ stays the right knob for per-request consumed capacity and page memory.
251
261
 
252
262
  #### Type Parameters
253
263
 
264
+ <a id="t-1"></a>
265
+
254
266
  ##### T
255
267
 
256
268
  `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -275,13 +287,15 @@ Expected shape of each yielded item.
275
287
 
276
288
  > **putItem**\<`T`\>(`input`): `Promise`\<`PutCommandOutput`\>
277
289
 
278
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:203](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L203)
290
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:210](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L210)
279
291
 
280
292
  Put an item into DynamoDB. The caller's `Item` is typed as `T`, which
281
293
  the document client marshalls automatically.
282
294
 
283
295
  #### Type Parameters
284
296
 
297
+ <a id="t-2"></a>
298
+
285
299
  ##### T
286
300
 
287
301
  `T`
@@ -306,7 +320,7 @@ Type of the item being stored.
306
320
 
307
321
  > **query**\<`T`\>(`input`): `Promise`\<`Omit`\<`QueryCommandOutput`, `"Items"`\> & `object`\>
308
322
 
309
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:272](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L272)
323
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:267](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L267)
310
324
 
311
325
  Execute a DynamoDB Query. The full `QueryCommandOutput` is returned with
312
326
  `Items` typed as `T[]` so callers retain pagination metadata
@@ -314,6 +328,8 @@ Execute a DynamoDB Query. The full `QueryCommandOutput` is returned with
314
328
 
315
329
  #### Type Parameters
316
330
 
331
+ <a id="t-3"></a>
332
+
317
333
  ##### T
318
334
 
319
335
  `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -338,7 +354,7 @@ Expected shape of each unmarshalled item.
338
354
 
339
355
  > **scan**\<`T`\>(`input`): `Promise`\<`Omit`\<`ScanCommandOutput`, `"Items"`\> & `object`\>
340
356
 
341
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:301](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L301)
357
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:296](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L296)
342
358
 
343
359
  Scan a DynamoDB table. The full `ScanCommandOutput` is returned with
344
360
  `Items` typed as `T[]` so callers retain pagination metadata.
@@ -358,6 +374,8 @@ embedding a scan in a Lambda.
358
374
 
359
375
  #### Type Parameters
360
376
 
377
+ <a id="t-4"></a>
378
+
361
379
  ##### T
362
380
 
363
381
  `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -382,7 +400,7 @@ Expected shape of each unmarshalled item.
382
400
 
383
401
  > **updateItem**\<`K`, `R`\>(`input`): `Promise`\<`Omit`\<`UpdateCommandOutput`, `"Attributes"`\> & `object`\>
384
402
 
385
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:226](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L226)
403
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:229](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L229)
386
404
 
387
405
  Update an item in DynamoDB. The `Attributes` field on the response is
388
406
  typed as `R` — the caller should choose `R` to match their
@@ -393,12 +411,16 @@ typed as `R` — the caller should choose `R` to match their
393
411
 
394
412
  #### Type Parameters
395
413
 
414
+ <a id="k-2"></a>
415
+
396
416
  ##### K
397
417
 
398
418
  `K` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
399
419
 
400
420
  Shape of the partition / sort key.
401
421
 
422
+ <a id="r-2"></a>
423
+
402
424
  ##### R
403
425
 
404
426
  `R` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: S3Service
8
8
 
9
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:72](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L72)
9
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:86](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L86)
10
10
 
11
11
  Wrapper around the AWS S3 client providing structured Powertools logging
12
12
  and X-Ray tracing by default.
@@ -27,7 +27,7 @@ tagging, version IDs) should use `S3Client` directly.
27
27
 
28
28
  > **new S3Service**(`opts?`): `S3Service`
29
29
 
30
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:82](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L82)
30
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:96](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L96)
31
31
 
32
32
  #### Parameters
33
33
 
@@ -59,7 +59,7 @@ which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
59
59
 
60
60
  > **copyObject**(`input`): `Promise`\<`CopyObjectCommandOutput`\>
61
61
 
62
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:177](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L177)
62
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:191](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L191)
63
63
 
64
64
  Copy an object within S3.
65
65
 
@@ -81,7 +81,7 @@ Copy an object within S3.
81
81
 
82
82
  > **deleteObject**(`input`): `Promise`\<`DeleteObjectCommandOutput`\>
83
83
 
84
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:265](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L265)
84
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:279](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L279)
85
85
 
86
86
  Delete a single object from S3.
87
87
 
@@ -103,12 +103,18 @@ Delete a single object from S3.
103
103
 
104
104
  > **deleteObjects**(`bucket`, `keys`): `Promise`\<`DeleteObjectsCommandOutput`[]\>
105
105
 
106
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:277](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L277)
106
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:297](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L297)
107
107
 
108
108
  Delete multiple objects from S3, auto-chunking the request into batches
109
109
  of 1000 keys (the S3-enforced DeleteObjects limit). Returns one output
110
110
  per chunk.
111
111
 
112
+ Every chunk is sent before the outcome is judged. If S3 reported a
113
+ per-key delete error, a [BatchOperationError](BatchOperationError.md) is then thrown
114
+ carrying the per-chunk results and the failed keys. Request-level SDK
115
+ exceptions (throttling, access denied) propagate unchanged and
116
+ immediately, so earlier chunks may already have been deleted.
117
+
112
118
  #### Parameters
113
119
 
114
120
  ##### bucket
@@ -131,12 +137,19 @@ per chunk.
131
137
 
132
138
  > **emptyBucket**(`bucket`): `Promise`\<`string`[]\>
133
139
 
134
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:316](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L316)
140
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:343](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L343)
135
141
 
136
142
  Delete every object in an **unversioned** bucket. Streams the listing
137
- page-by-page and delegates each page's deletion to `deleteObjects`, so
138
- peak memory stays bounded by one page (~1000 keys) regardless of bucket
139
- size.
143
+ page-by-page and delegates each page's deletion to `deleteObjects`, so no
144
+ more than one page (~1000 keys) of SDK responses is held at a time. The
145
+ only thing that grows with the bucket is the list of deleted keys this
146
+ method returns.
147
+
148
+ A page with per-key delete errors does not stop the run: every page is
149
+ attempted, then one [BatchOperationError](BatchOperationError.md) is thrown carrying every
150
+ failed key in `failed` and, per page, the keys that were deleted in
151
+ `results`. Request-level SDK exceptions propagate unchanged and
152
+ immediately, so earlier pages may already have been deleted.
140
153
 
141
154
  **Versioned buckets are out of scope.** This paginates `ListObjectsV2`,
142
155
  which reports only current object versions — never noncurrent versions or
@@ -157,7 +170,11 @@ use `S3Client` directly for that.
157
170
 
158
171
  `Promise`\<`string`[]\>
159
172
 
160
- The keys this call issued deletes for.
173
+ The keys that were deleted.
174
+
175
+ #### Throws
176
+
177
+ If S3 could not delete one or more keys.
161
178
 
162
179
  ***
163
180
 
@@ -167,13 +184,15 @@ The keys this call issued deletes for.
167
184
 
168
185
  > **getAllObjects**\<`T`\>(`bucket`, `prefix?`): `Promise`\<`T`[]\>
169
186
 
170
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:203](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L203)
187
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:217](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L217)
171
188
 
172
189
  List and JSON-parse every object under a bucket and optional prefix.
173
190
  Auto-paginated. Objects without a body are skipped.
174
191
 
175
192
  #### Type Parameters
176
193
 
194
+ <a id="t"></a>
195
+
177
196
  ##### T
178
197
 
179
198
  `T`
@@ -202,12 +221,14 @@ Expected type of each parsed object.
202
221
 
203
222
  > **getJsonObject**\<`T`\>(`input`): `Promise`\<`T` \| `undefined`\>
204
223
 
205
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:155](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L155)
224
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:169](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L169)
206
225
 
207
226
  Get an object from S3 and parse it as JSON.
208
227
 
209
228
  #### Type Parameters
210
229
 
230
+ <a id="t-1"></a>
231
+
211
232
  ##### T
212
233
 
213
234
  `T`
@@ -238,7 +259,7 @@ If the body is non-empty and not valid JSON.
238
259
 
239
260
  > **getObject**(`input`): `Promise`\<`GetObjectCommandOutput`\>
240
261
 
241
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:129](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L129)
262
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:143](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L143)
242
263
 
243
264
  Get an object from S3.
244
265
 
@@ -260,7 +281,7 @@ Get an object from S3.
260
281
 
261
282
  > **getObjectBody**(`input`): `Promise`\<`string` \| `undefined`\>
262
283
 
263
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:141](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L141)
284
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:155](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L155)
264
285
 
265
286
  Get an object from S3 and return its body as a string.
266
287
 
@@ -285,7 +306,7 @@ has no body.
285
306
 
286
307
  > **getPresignedUrl**(`input`): `Promise`\<`string`\>
287
308
 
288
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:241](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L241)
309
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:255](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L255)
289
310
 
290
311
  Generate a presigned URL that callers can use to GET or PUT an S3 object
291
312
  directly, without going through the wrapper. The signing happens against
@@ -339,7 +360,7 @@ The S3 object key.
339
360
 
340
361
  > **headObject**(`input`): `Promise`\<`HeadObjectCommandOutput`\>
341
362
 
342
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:167](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L167)
363
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:181](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L181)
343
364
 
344
365
  Fetch the metadata for an S3 object without downloading its body.
345
366
 
@@ -361,7 +382,7 @@ Fetch the metadata for an S3 object without downloading its body.
361
382
 
362
383
  > **listObjects**(`bucket`, `prefix?`): `Promise`\<`string`[]\>
363
384
 
364
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:188](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L188)
385
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:202](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L202)
365
386
 
366
387
  List object keys under a bucket and optional prefix, auto-paginating
367
388
  across all pages.
@@ -388,7 +409,7 @@ across all pages.
388
409
 
389
410
  > **putJsonObject**\<`T`\>(`input`): `Promise`\<`PutObjectCommandOutput`\>
390
411
 
391
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:112](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L112)
412
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:126](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L126)
392
413
 
393
414
  Serialise a value to JSON and store it as an S3 object.
394
415
 
@@ -398,6 +419,8 @@ large or sensitive content into CloudWatch.
398
419
 
399
420
  #### Type Parameters
400
421
 
422
+ <a id="t-2"></a>
423
+
401
424
  ##### T
402
425
 
403
426
  `T`
@@ -422,7 +445,7 @@ Type of the value being stored.
422
445
 
423
446
  > **putObject**(`input`): `Promise`\<`PutObjectCommandOutput`\>
424
447
 
425
- Defined in: [packages/aws-wrappers/src/s3/s3.ts:96](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/s3/s3.ts#L96)
448
+ Defined in: [packages/aws-wrappers/src/s3/s3.ts:110](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/s3/s3.ts#L110)
426
449
 
427
450
  Put an object into S3.
428
451
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: SNSService
8
8
 
9
- Defined in: [packages/aws-wrappers/src/sns/sns.ts:44](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sns/sns.ts#L44)
9
+ Defined in: [packages/aws-wrappers/src/sns/sns.ts:45](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sns/sns.ts#L45)
10
10
 
11
11
  Wrapper around the AWS SNS client providing structured Powertools logging
12
12
  and X-Ray tracing by default.
@@ -23,7 +23,7 @@ log line omits them; the verbose levels (`POWERTOOLS_LOG_LEVEL=DEBUG` or
23
23
 
24
24
  > **new SNSService**(`opts?`): `SNSService`
25
25
 
26
- Defined in: [packages/aws-wrappers/src/sns/sns.ts:60](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sns/sns.ts#L60)
26
+ Defined in: [packages/aws-wrappers/src/sns/sns.ts:61](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sns/sns.ts#L61)
27
27
 
28
28
  #### Parameters
29
29
 
@@ -65,7 +65,7 @@ its own `truncate` option.
65
65
 
66
66
  > **publish**(`input`, `opts?`): `Promise`\<`PublishCommandOutput`\>
67
67
 
68
- Defined in: [packages/aws-wrappers/src/sns/sns.ts:74](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sns/sns.ts#L74)
68
+ Defined in: [packages/aws-wrappers/src/sns/sns.ts:75](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sns/sns.ts#L75)
69
69
 
70
70
  Publish a single message to an SNS topic.
71
71
 
@@ -98,13 +98,19 @@ PublishCommandInput including TopicArn and Message.
98
98
 
99
99
  > **publishBatch**(`input`): `Promise`\<`PublishBatchCommandOutput`[]\>
100
100
 
101
- Defined in: [packages/aws-wrappers/src/sns/sns.ts:126](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sns/sns.ts#L126)
101
+ Defined in: [packages/aws-wrappers/src/sns/sns.ts:134](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sns/sns.ts#L134)
102
102
 
103
103
  Publish a batch of messages to an SNS topic. The SNS API caps
104
104
  PublishBatch at 10 entries per request, so this method auto-chunks
105
105
  the caller's `PublishBatchRequestEntries` and sends one request per
106
106
  chunk, returning the array of outputs.
107
107
 
108
+ Every chunk is sent before the outcome is judged. If SNS rejected any
109
+ entry, a [BatchOperationError](BatchOperationError.md) is then thrown carrying the
110
+ per-chunk results and the failed entries. Request-level SDK exceptions
111
+ (throttling, access denied) propagate unchanged and immediately, so
112
+ earlier chunks may already have been published.
113
+
108
114
  #### Parameters
109
115
 
110
116
  ##### input
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: SQSService
8
8
 
9
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:56](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L56)
9
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:62](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L62)
10
10
 
11
11
  Wrapper around the AWS SQS client providing structured Powertools logging
12
12
  and X-Ray tracing by default.
@@ -23,7 +23,7 @@ log line omits them; the verbose levels (`POWERTOOLS_LOG_LEVEL=DEBUG` or
23
23
 
24
24
  > **new SQSService**(`opts?`): `SQSService`
25
25
 
26
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:71](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L71)
26
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:77](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L77)
27
27
 
28
28
  #### Parameters
29
29
 
@@ -64,7 +64,7 @@ option.
64
64
 
65
65
  > **deleteMessage**(`input`): `Promise`\<`DeleteMessageCommandOutput`\>
66
66
 
67
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:135](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L135)
67
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:141](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L141)
68
68
 
69
69
  Delete a single message from an SQS queue.
70
70
 
@@ -86,7 +86,7 @@ Delete a single message from an SQS queue.
86
86
 
87
87
  > **deleteMessageBatch**(`input`): `Promise`\<`DeleteMessageBatchCommandOutput`[]\>
88
88
 
89
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:209](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L209)
89
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:185](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L185)
90
90
 
91
91
  Delete a batch of messages from an SQS queue. The SQS API caps
92
92
  DeleteMessageBatch at 10 entries per request, so this method auto-chunks
@@ -117,7 +117,7 @@ been deleted.
117
117
 
118
118
  > **receiveMessages**(`input`): `Promise`\<`Message`[]\>
119
119
 
120
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:126](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L126)
120
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:132](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L132)
121
121
 
122
122
  Receive messages from an SQS queue. Returns an empty array when no
123
123
  messages are available. No automatic deletion is performed — visibility
@@ -143,7 +143,7 @@ The `Messages` array from the response, or `[]` if absent.
143
143
 
144
144
  > **sendMessage**(`input`, `opts?`): `Promise`\<`SendMessageCommandOutput`\>
145
145
 
146
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:83](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L83)
146
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:89](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L89)
147
147
 
148
148
  Send a single message to an SQS queue.
149
149
 
@@ -174,7 +174,7 @@ see `SEND_MESSAGE_SAFE_FIELDS`.
174
174
 
175
175
  > **sendMessageBatch**(`input`): `Promise`\<`SendMessageBatchCommandOutput`[]\>
176
176
 
177
- Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:177](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/sqs/sqs.ts#L177)
177
+ Defined in: [packages/aws-wrappers/src/sqs/sqs.ts:157](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/sqs/sqs.ts#L157)
178
178
 
179
179
  Send a batch of messages to an SQS queue. The SQS API caps
180
180
  SendMessageBatch at 10 entries per request, so this method auto-chunks
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: SSMService
8
8
 
9
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:54](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L54)
9
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:54](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L54)
10
10
 
11
11
  Wrapper around the AWS SSM Parameter Store client providing structured
12
12
  Powertools logging and X-Ray tracing by default. All read operations enable
@@ -31,7 +31,7 @@ mutate within the application.
31
31
 
32
32
  > **new SSMService**(`opts?`): `SSMService`
33
33
 
34
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:64](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L64)
34
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:64](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L64)
35
35
 
36
36
  #### Parameters
37
37
 
@@ -63,7 +63,7 @@ which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
63
63
 
64
64
  > **deleteParameter**(`name`): `Promise`\<`void`\>
65
65
 
66
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:151](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L151)
66
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:151](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L151)
67
67
 
68
68
  Delete an SSM parameter by name.
69
69
 
@@ -88,7 +88,7 @@ runtime cleanup only.
88
88
 
89
89
  > **getParameter**(`name`): `Promise`\<`string` \| `undefined`\>
90
90
 
91
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:75](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L75)
91
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:75](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L75)
92
92
 
93
93
  Fetch a single SSM parameter's value.
94
94
 
@@ -115,7 +115,7 @@ value set.
115
115
 
116
116
  > **getParameters**\<`K`\>(`aliases`): `Promise`\<`Record`\<`K`, `string` \| `undefined`\>\>
117
117
 
118
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:107](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L107)
118
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:107](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L107)
119
119
 
120
120
  Fetch multiple SSM parameters in a single request. Callers supply an
121
121
  alias-to-path record, and the returned record is keyed by the same
@@ -136,6 +136,8 @@ merging the results before building the alias-keyed return value.
136
136
 
137
137
  #### Type Parameters
138
138
 
139
+ <a id="k"></a>
140
+
139
141
  ##### K
140
142
 
141
143
  `K` *extends* `string`
@@ -165,7 +167,7 @@ no value.
165
167
 
166
168
  > **getParametersByPath**(`path`, `opts?`): `Promise`\<`Parameter`[]\>
167
169
 
168
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:167](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L167)
170
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:167](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L167)
169
171
 
170
172
  Fetch all parameters under an SSM hierarchy path, auto-paginating across
171
173
  all pages. `Recursive` defaults to `true` (overriding the AWS SDK
@@ -204,7 +206,7 @@ The full `Parameter` objects (including `Version`,
204
206
 
205
207
  > **putParameter**(`input`): `Promise`\<`PutParameterCommandOutput`\>
206
208
 
207
- Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:138](https://github.com/aligent/microservice-development-utilities/blob/36323d6a14efbe8673c2a1e7e5c4b742c6b4220a/packages/aws-wrappers/src/ssm/ssm.ts#L138)
209
+ Defined in: [packages/aws-wrappers/src/ssm/ssm.ts:138](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/ssm/ssm.ts#L138)
208
210
 
209
211
  Create or update an SSM parameter. The log line omits `Value` to avoid
210
212
  leaking secret material.