Skip to content

GetArtifactUrl

Source: src/AWS/Amplify/GetArtifactUrl.ts

Runtime binding for amplify:GetArtifactUrl.

Bind an App in the function’s init phase to get a callable that resolves a pre-signed download URL for a build artifact discovered via ListArtifacts. Provide the implementation with Effect.provide(AWS.Amplify.GetArtifactUrlHttp).

// init — bind the operation to the app
const listArtifacts = yield* AWS.Amplify.ListArtifacts(app);
const getArtifactUrl = yield* AWS.Amplify.GetArtifactUrl(app);
// runtime — resolve a pre-signed URL for the first artifact
const { artifacts } = yield* listArtifacts({
branchName: "main",
jobId: "42",
});
const { artifactUrl } = yield* getArtifactUrl({
artifactId: artifacts[0].artifactId,
});