Skip to content

AWS.Sandbox Signer reference

Source: packages/aws/src/SandboxSigner.ts Kind: Layer

Lets a sandbox send its AWS requests itself. With only a gateway, an AWS binding’s whole call runs in the gateway, and every byte passes through it. With this Layer too, the binding runs in the sandbox: it asks the gateway for a signature, which is made with the gateway’s role, and sends the request straight to AWS. The sandbox never holds a key, and a large upload or download never touches the gateway.

The gateway signs any request its role is allowed to make, so what the sandbox can do is what the sandbox’s AWS bindings were granted.

Effect.provide(
Layer.mergeAll(AWS.S3.GetObjectHttp, AWS.S3.PutObjectHttp).pipe(
Layer.provide(AWS.SandboxSigner),
Layer.provide(AWS.Lambda.SandboxGateway),
),
)