Skip to content

DeploymentEventSource

Source: src/AWS/AppConfig/DeploymentEventSource.ts

Event source connecting AppConfig deployment notifications to the hosting compute. The contract is a Binding.Service; the Lambda implementation layer is Lambda.AppConfigDeploymentEventSource (extension + association + invoke role at deploy time, payload dispatch at runtime). Consume it through the consumeDeploymentEvents helper.

export default MyFunction.make(
{ main: import.meta.url },
Effect.gen(function* () {
const app = yield* AppConfig.Application("App", {});
const env = yield* AppConfig.Environment("Env", {
applicationId: app.applicationId,
});
yield* AppConfig.consumeDeploymentEvents(env, (events) =>
events.pipe(
Stream.runForEach((event) =>
Effect.log(`deployment event: ${event.Type}`),
),
),
);
}).pipe(Effect.provide(Lambda.AppConfigDeploymentEventSource)),
);