Skip to content

Extension

Source: src/AWS/AppConfig/Extension.ts

An AWS AppConfig extension — a set of actions AppConfig performs at specific points of the configuration workflow (before a version is created, before/while/after a deployment). Actions can invoke Lambda functions, publish to SNS/SQS, or emit EventBridge events.

Associate the extension with an application, environment, or configuration profile using ExtensionAssociation.

Notify a Lambda when a deployment completes

const extension = yield* AppConfig.Extension("DeployHook", {
actions: {
ON_DEPLOYMENT_COMPLETE: [
{
name: "notify",
uri: fn.functionArn,
roleArn: role.roleArn,
},
],
},
});

Validate content before a deployment starts

const extension = yield* AppConfig.Extension("PreflightCheck", {
description: "Reject deployments outside business hours",
actions: {
PRE_START_DEPLOYMENT: [
{ name: "preflight", uri: fn.functionArn, roleArn: role.roleArn },
],
},
});