Skip to content

StartDeployment

Source: src/AWS/Amplify/StartDeployment.ts

Runtime binding for amplify:StartDeployment.

Bind an App in the function’s init phase to get a callable that releases a manual deployment on a branch of an app with no connected repository — either a deployment staged with CreateDeployment (jobId) or content fetched from a public sourceUrl (zip URL or S3 prefix). Provide the implementation with Effect.provide(AWS.Amplify.StartDeploymentHttp).

Release a Staged Deployment

// init — bind the operation to the app
const startDeployment = yield* AWS.Amplify.StartDeployment(app);
// runtime — release the artifact uploaded via CreateDeployment
const { jobSummary } = yield* startDeployment({
branchName: "main",
jobId,
});

Deploy Directly from an S3 Prefix

const { jobSummary } = yield* startDeployment({
branchName: "main",
sourceUrl: "s3://my-site-artifacts/latest/",
sourceUrlType: "BUCKET_PREFIX",
});