All skills
aws avatar

/aws-sdk-js-v3-usage

@c3ed514

AWS SDK for JavaScript v3 development patterns. Use when writing JavaScript or TypeScript code that uses AWS services via @aws-sdk/* packages (aws-sdk-js-v3), or when asked about schemas, runtime validation, serialization, or code generation in the context of the JS/TS AWS SDK.

Use this Skill: https://skilld.dev/gh/aws/agent-toolkit-for-aws/aws-sdk-js-v3-usage

This session only. Nothing lands on disk.

referencestypescript.md

≈271 tokens on demand. Your agent reads this file only when SKILL.md points to it.

TypeScript Reference

Remove | undefined from Response Structures

SDK response fields are typed as T | undefined by default. To opt out of this for a client:

import { S3Client } from "@aws-sdk/client-s3";
import type { AssertiveClient } from "@smithy/types";

const client = new S3Client({}) as AssertiveClient<S3Client>;
// Response fields are no longer unioned with undefined

See @smithy/types docs for AssertiveClient and UncheckedClient (skips all runtime checks).

Narrow Streaming Blob Types

GetObjectCommand Body is typed as a union because the runtime type depends on the request handler (Node.js vs browser). To narrow it:

import { S3Client } from "@aws-sdk/client-s3";
import type { NodeJsClient } from "@smithy/types";

const client = new NodeJsClient<S3Client>(new S3Client({}));
// Body is now typed as NodeJsRuntimeStreamingBlob (Readable) instead of a union

Minimum TypeScript Version

No official minimum. Use a recent version. The SDK's own TypeScript version is in the root package.json of the aws-sdk-js-v3 repo.

Source: SKILL.md on GitHub

No alerts17d3 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill is a comprehensive documentation resource for the AWS SDK for JavaScript v3. It provides development patterns, best practices for credential management, resource handling, and performance optimization using official AWS packages and repositories.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

Signed by skilld at c3ed514. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 months ago

README badge

README badge for aws/agent-toolkit-for-aws/aws-sdk-js-v3-usage