Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@aligent/aws-wrappers

Latest version: v0.6.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: aligent-bot, jarrod.swift, tom.thorogood
2 Stars
0 Forks
13 Versions
1.2K Downloads
TypeScript Repo language

Scan summary

@aligent/aws-wrappers was last scanned on 30 Nov 2026 at version 0.6.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 13 versions; the latest 4 were published within 7 days (24–30 Nov 2026).
  • Findings: No rules fired in version 0.6.0.
  • Downloads: 1,150 downloads.

Versions

13 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.0 LATEST 30 Nov 2026 No rules fired
0.5.11 27 Nov 2026 No rules fired
0.5.10 25 Nov 2026 No rules fired
0.5.9 24 Nov 2026 Not shown
0.5.8 16 Nov 2026 Not shown

No rules fired in 0.6.0

Findings

Findings for v0.6.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@aligent/aws-wrappers

Opinionated AWS SDK wrappers with Powertools logging and X-Ray tracing baked in. Each *Service class instantiates and instruments its underlying SDK client by default and emits a structured logger.info line on every operation, so consumers get a consistent, observable starting point without rewriting the same boilerplate per service.

Installation

npm install @aligent/aws-wrappers

Requires Node 20 or later, the minimum the underlying @aws-sdk/* v3 clients support. The package is compiled to ES2022 and ships native class declarations, so older runtimes fail at import time with a syntax error rather than degrading gracefully.

Conventions

Every wrapper takes the same optional constructor options:

new XService({ logger?, client? })
  • logger — a Powertools Logger. Defaults to new Logger(), which picks up POWERTOOLS_SERVICE_NAME from the environment (recommended) and otherwise falls back to Powertools' own default.
  • client — a pre-configured SDK client. When omitted, the wrapper instantiates the SDK client itself and wraps it with captureAWSv3Client for X-Ray tracing. When supplied, the wrapper passes it through unchanged — the caller is responsible for X-Ray instrumentation.
Log redaction

Every wrapper emits one logger.info line per SDK call with a per-method safe-field allowlist (omitting payloads, secret material, and PII recipient identifiers). Set POWERTOOLS_LOG_LEVEL to either DEBUG or TRACE to unlock the full SDK input in those log lines — useful for local development and incident triage. Both levels unlock because Powertools orders TRACE as more verbose than DEBUG; every level from INFO upwards redacts. See packages/aws-wrappers/CLAUDE.md for the per-method allowlists currently in force.

Batch semantics

Batch methods split your entries into chunks of the size the AWS API allows and send one request per chunk. AWS reports rejected entries inside an otherwise successful response, so a resolved request does not mean every entry was accepted. Currently covered: SQSService.sendMessageBatch, SQSService.deleteMessageBatch, SNSService.publishBatch, SESService.sendBulkEmail, EventBridgeService.putEvents, S3Service.deleteObjects, S3Service.emptyBucket, DynamoDBService.batchGet, DynamoDBService.batchWrite and, when required is set, SSMService.getParameters.

Every chunk is sent first. If any entry was rejected, the method then throws a single BatchOperationError. A call where nothing was rejected returns exactly what it did before.

import { BatchOperationError } from '@aligent/aws-wrappers';

try {
    await sqs.sendMessageBatch({ QueueUrl, Entries: entries });
} catch (error) {
    if (error instanceof BatchOperationError) {
        // error.results — the raw SDK output of every chunk, including what succeeded
        //                 (empty for SSM, per-page deleted keys for S3 emptyBucket,
        //                 the single last output for DynamoDB)
        // error.failed  — [{ id, code, message }] for every rejected entry
        const failedIds = new Set(error.failed.map(entry => entry.id));
        await retry(entries.filter(entry => failedIds.has(entry.Id)));
        return;
    }
    throw error;
}
  • failed carries only the entry identifier, error code and message — never message bodies, attributes or any other payload. For S3 the identifier is the object key; for SSM it is the parameter path.
  • EventBridgeService.putEvents and SESService.sendBulkEmail entries have no identifier of their own, so for those methods id is the entry's index in the Entries / BulkEmailEntries list you passed in, as a string.
  • DynamoDB batch entries have no identifier either, and the key or item is caller data that must stay out of failed, so id is <table>[<index>], the position within that table's still-unprocessed list — see the DynamoDB section.
  • The error has a stable name of 'BatchOperationError'. If both the CJS and ESM builds of this package can be loaded in one process, check error.name instead of instanceof.
  • A warning is logged with the failure count and error codes, and no payload, at every log level.
  • Don't log the error object itself. results is an enumerable property, and the Powertools logger serialises every enumerable property of an error it is given, so logger.error('…', error) (or { error }) writes results to the log. For the DynamoDB batch methods that holds your keys, items and the items you fetched. Log error.name, error.message and error.failed instead, and read error.results only to retry or recover.
  • Request-level SDK exceptions (throttling, access denied, network errors) are not wrapped. They propagate unchanged and immediately, so earlier chunks may already have been sent and the caller cannot tell which. Treat those as "outcome unknown" and make the operation safe to repeat.
X-Ray outside Lambda

X-Ray's middleware throws by default when no active segment exists, which is the case for CLI scripts and local development. Set the environment variable to silence the noise:

AWS_XRAY_CONTEXT_MISSING=IGNORE_ERROR

S3

import { S3Service } from '@aligent/aws-wrappers';

const s3 = new S3Service();

await s3.putObject({ Bucket: 'my-bucket', Key: 'file.txt', Body: 'hello' });

await s3.putJsonObject({ Bucket: 'my-bucket', Key: 'data.json', Body: { foo: 'bar' } });
const data = await s3.getJsonObject<MyType>({ Bucket: 'my-bucket', Key: 'data.json' });

// getObject returns the raw GetObjectCommandOutput when you need metadata
// (LastModified, ContentLength, …) alongside the body.
const raw = await s3.getObject({ Bucket: 'my-bucket', Key: 'file.txt' });
const body = await s3.getObjectBody({ Bucket: 'my-bucket', Key: 'file.txt' });

const { LastModified } = await s3.headObject({ Bucket: 'my-bucket', Key: 'file.txt' });

const keys = await s3.listObjects('my-bucket', 'prefix/');
const items = await s3.getAllObjects<MyType>('my-bucket', 'prefix/');

await s3.copyObject({ Bucket: 'dest', Key: 'dest-key', CopySource: 'src/src-key' });

// Presigned URLs for direct browser-side download / upload.
// expiresIn defaults to 3600 seconds.
const downloadUrl = await s3.getPresignedUrl({
    Bucket: 'my-bucket',
    Key: 'file.txt',
    action: 'get',
});
const uploadUrl = await s3.getPresignedUrl({
    Bucket: 'my-bucket',
    Key: 'file.txt',
    action: 'put',
    expiresIn: 600,
});

await s3.deleteObject({ Bucket: 'my-bucket', Key: 'file.txt' });
await s3.deleteObjects('my-bucket', ['key1', 'key2']); // auto-chunked to 1000 keys per request
await s3.emptyBucket('my-bucket');                     // unversioned buckets only — see below

getJsonObject and getAllObjects throw when an object body is not valid JSON. The error names the object (s3://bucket/key) and deliberately carries none of its content, unlike the native SyntaxError, which quotes a snippet of the input. getAllObjects stops at the first bad object.

deleteObjects and emptyBucket throw a BatchOperationError when S3 reports that it could not delete one or more keys — see "Batch semantics". failed[].id is the object key.

emptyBucket returns only the keys that were actually deleted. A page with failures does not stop the run: every page is attempted, then one aggregated BatchOperationError is thrown. Its results hold one { deletedKeys } per page, so the caller can tell which keys were deleted and which failed:

try {
    const deleted = await s3.emptyBucket('my-bucket');
} catch (error) {
    if (error instanceof BatchOperationError) {
        const deleted = error.results.flatMap(page => page.deletedKeys);
        const stuck = error.failed.map(entry => entry.id); // [{ id: key, code, message }]
    }
    throw error;
}

Input shapes are intentionally tight (Bucket, Key, Body and similar). Callers needing SDK-specific options like server-side encryption or tagging should use S3Client directly.

emptyBucket streams the listing page-by-page and delegates each page to deleteObjects, so only one page of SDK responses is held at a time; the list of deleted keys it returns is the one thing that grows with the bucket. It empties unversioned buckets only: it paginates ListObjectsV2, which reports current object versions and never noncurrent versions or delete markers. Against a versioned bucket the call succeeds and the bucket then looks empty to ListObjectsV2 — but the deletes only added delete markers, so every object version is still stored. You will still be billed for that storage, and DeleteBucket will fail with BucketNotEmpty. Emptying a versioned bucket needs ListObjectVersions plus per-version deletes — use S3Client directly.

DynamoDB

import { DynamoDBService } from '@aligent/aws-wrappers';

const ddb = new DynamoDBService();

// Backed by DynamoDBDocumentClient — items are plain TS objects in both directions.
await ddb.putItem({ TableName: 'my-table', Item: { pk: 'abc', value: 42 } });

// Key-bearing methods take two generics: <K, R> for the key shape and the
// return / Attributes shape. Both default to Record<string, unknown> so callers
// can omit one or both when they don't care.
type MyKey = { pk: string };
type MyItem = { pk: string; value: number };

const item = await ddb.getItem<MyKey, MyItem>({
    TableName: 'my-table',
    Key: { pk: 'abc' },
});

const { Items } = await ddb.query<MyItem>({
    TableName: 'my-table',
    KeyConditionExpression: 'pk = :pk',
    ExpressionAttributeValues: { ':pk': 'abc' },
});

// scan returns the same shape as query — full output with Items typed as T[].
const { Items: all } = await ddb.scan<{ pk: string }>({ TableName: 'my-table' });

// updateItem / deleteItem mirror getItem's <K, R> generics.
const { Attributes } = await ddb.updateItem<MyKey, { value: number }>({
    TableName: 'my-table',
    Key: { pk: 'abc' },
    UpdateExpression: 'SET #v = :v',
    ExpressionAttributeNames: { '#v': 'value' },
    ExpressionAttributeValues: { ':v': 99 },
    ReturnValues: 'ALL_NEW',
});

await ddb.deleteItem({ TableName: 'my-table', Key: { pk: 'abc' } });

// batchWrite retries UnprocessedItems with jittered exponential backoff
// (5 attempts, 200ms base) and throws a BatchOperationError if any remain
// after the final attempt — see below.
await ddb.batchWrite({
    RequestItems: {
        'my-table': [{ PutRequest: { Item: { pk: 'abc' } } }],
    },
});

// paginateItems / paginateScan yield each item — use for potentially unbounded result sets.
for await (const item of ddb.paginateItems<{ pk: string }>({
    TableName: 'my-table',
    KeyConditionExpression: 'pk = :pk',
    ExpressionAttributeValues: { ':pk': 'abc' },
})) {
    console.log(item.pk);
}

for await (const item of ddb.paginateScan<{ pk: string }>({ TableName: 'my-table' })) {
    console.log(item.pk);
}

// `Limit` is a PAGE SIZE, not a total cap — this walks the whole result set
// in pages of 10, it does not stop after 10 items. `break` to bound the read.
const firstTen: Array<{ pk: string }> = [];
for await (const item of ddb.paginateItems<{ pk: string }>({
    TableName: 'my-table',
    KeyConditionExpression: 'pk = :pk',
    ExpressionAttributeValues: { ':pk': 'abc' },
    Limit: 10,
})) {
    firstTen.push(item);
    if (firstTen.length === 10) break; // stops immediately — no further requests
}

Limit on paginateItems / paginateScan is applied by DynamoDB per request, and both methods walk every page until LastEvaluatedKey is exhausted. Passing Limit: 10 therefore yields every matching item in pages of 10, not the first 10. Because both return an AsyncGenerator, break calls its return(), which unwinds the pagination and issues no further requests — that is how you bound the number of items. Limit is still the right knob for tuning per-request consumed capacity and page memory; it just doesn't stop the walk.

batchGet is not generic — its Responses field is a multi-table record whose item shapes can differ per table, so no single generic can soundly describe it. Callers should narrow the result type at the call site. Like batchWrite, it retries non-empty UnprocessedKeys with jittered exponential backoff (5 attempts, 200ms base), merging Responses across attempts.

When items or keys are still unprocessed after the final attempt, batchGet and batchWrite throw a BatchOperationError (see "Batch semantics") rather than a plain Error, so a caller that caught Error and matched the old batchGet failed after 5 attempts message must match on the error name instead. Nothing is lost: error.results holds one output, and its UnprocessedKeys / UnprocessedItems are exactly what is left to retry. For batchGet that output also carries the Responses merged across every attempt, so the items already retrieved are still available:

try {
    return await ddb.batchGet({ RequestItems: { 'my-table': { Keys: keys } } });
} catch (error) {
    if (error instanceof BatchOperationError) {
        const [partial] = error.results; // { Responses, UnprocessedKeys, ... }
        // retry partial.UnprocessedKeys later, keep partial.Responses
    }
    throw error;
}

failed has one entry per pending key or item, with code UnprocessedKeys or UnprocessedItems. Because the key or item is your data and must stay out of the error message and logs, failed[].id is <table>[<index>], the position within results[0].UnprocessedKeys[table].Keys (or results[0].UnprocessedItems[table]). results does carry that data, as it is what you asked for or sent, so don't log results or the error object itself: the Powertools logger serialises an error's enumerable properties, results included (see Batch semantics).

Secrets Manager

import { SecretsManagerService } from '@aligent/aws-wrappers';

const secrets = new SecretsManagerService();

const raw = await secrets.getSecret('my-secret-name');
const config = await secrets.getJsonSecret<MySecretShape>('my-secret-name');

getSecret throws when the response has no SecretString (e.g. a binary-only secret). getJsonSecret additionally throws if the secret value is not valid JSON; that error names the secret and deliberately carries none of its value, unlike the native SyntaxError, which quotes a snippet of the input. VersionId / VersionStage aren't exposed — use SecretsManagerClient directly if you need version pinning.

// Write operations. Prefer IaC (CDK / Terraform) for secret lifecycle;
// reserve these for rotation flows or dynamically-issued credentials.
await secrets.createSecret({ Name: 'my-secret', SecretString: 'shh' });
await secrets.updateSecret({ SecretId: 'my-secret', Description: 'updated' });
await secrets.putSecretValue({ SecretId: 'my-secret', SecretString: 'new-shh' });
await secrets.deleteSecret({ SecretId: 'my-secret', RecoveryWindowInDays: 7 });

Step Functions

import { StepFunctionsService } from '@aligent/aws-wrappers';

const sfn = new StepFunctionsService();

// Auto-paginated — returns every execution across all pages.
const executions = await sfn.listExecutions({
    stateMachineArn: 'arn:aws:states:us-east-1:0:stateMachine:my-sfn',
    statusFilter: 'RUNNING',
});

const { executionArn } = await sfn.startExecution({
    stateMachineArn: 'arn:aws:states:us-east-1:0:stateMachine:my-sfn',
    input: JSON.stringify({ foo: 'bar' }),
});

const description = await sfn.describeExecution({ executionArn });

await sfn.stopExecution({ executionArn });

EventBridge Scheduler

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @aligent/aws-wrappers

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229