Skip to content

CreateAuthToken

Source: src/AWS/Lambda/CreateAuthToken.ts

Runtime binding for CreateMicrovmAuthToken.

Bind it to a {@link MicrovmImage} to get a callable that mints a short-lived token for a running MicroVM. Send it on the MicroVM endpoint in the X-aws-proxy-auth header.

const createAuthToken = yield* AWS.Lambda.CreateAuthToken(Sandbox);
const { authToken } = yield* createAuthToken({
microvmIdentifier: vm.microvmId,
expirationInMinutes: 5,
allowedPorts: [{ port: 5000 }],
});