Files
hyperframes/packages/aws-lambda/src/sdk/index.ts
Miguel Ángel 0df088926e feat(aws-lambda): push a prebuilt image to ECR without Docker (#6063)
* feat(aws-lambda): push a prebuilt image to ECR without Docker

Adds pushImageToEcr and ensureEcrRepository to the SDK subpath. The push
reads a single-platform OCI image layout, verifies every blob against its
descriptor before any ECR call, uploads only the blobs ECR lacks through
the layer-upload API, and puts the manifest under a tag, returning the
digest-pinned image URI.

* fix(aws-lambda): keep the ECR client out of the SDK bundle

Like the other AWS SDK clients, @aws-sdk/client-ecr is a dependency the consumer
resolves. Bundled into the ESM SDK it hits a dynamic require of node:https and
the packed package fails to import.

* feat(aws-lambda): build the ECR client from a region like the other SDK calls

* build(aws-lambda): add only the ECR client to the lockfile

* fix(aws-lambda): adopt an existing ECR repository only when it carries the caller's tags

* chore(aws-lambda): raise the size budget for pushing an image to ECR

pushImageToEcr ships in dist (unminified chunk plus its .d.ts); no source maps, tests or release-only files are involved. Built dist, npm pack --dry-run, main versus main plus this branch: +2486 B packed, +8846 B unpacked. The merge-group run measured 73369 packed and 266805 unpacked, which are the new budgets (were 70874 and 258166).
2026-10-23 04:35:25 +00:00

57 lines
1.5 KiB
TypeScript

/**
* SDK subpath export — `@hyperframes/aws-lambda/sdk`.
*
* Pulled into its own subpath so consumers that only drive Lambda renders
* (CLI, CI scripts, adopter tooling) don't pay the cost of importing
* `./handler.js`, which transitively pulls `@sparticuz/chromium` +
* `puppeteer-core` into the module graph. The SDK files here are
* AWS-SDK only — safe to load in any Node environment.
*/
export {
deploySite,
type DeploySiteOptions,
type SiteHandle,
siteHandleFromId,
} from "./deploySite.js";
export {
assertStackReadsSites,
renderToLambda,
type RenderHandle,
type RenderToLambdaOptions,
} from "./renderToLambda.js";
export {
getRenderProgress,
type GetRenderProgressOptions,
type RenderError,
type RenderProgress,
type RenderStatus,
} from "./getRenderProgress.js";
export {
type BilledLambdaInvocation,
computeRenderCost,
type RenderCost,
} from "./costAccounting.js";
export {
InvalidConfigError,
MAX_STEP_FUNCTIONS_INPUT_BYTES,
validateDistributedRenderConfig,
validateStepFunctionsInputSize,
validateVariablesPayload,
} from "./validateConfig.js";
export {
type PrebuiltHandler,
prebuiltHandler,
prebuiltVideoImage,
type ReleaseAssetManifest,
} from "./prebuiltHandler.js";
export {
ensureEcrRepository,
type EnsureEcrRepositoryOptions,
type PushedImage,
pushImageToEcr,
type PushImageToEcrOptions,
} from "./pushImageToEcr.js";
export type { SerializableDistributedRenderConfig } from "../events.js";
export type { DistributedFormat } from "../formatExtension.js";