About Amazon AppConfig extensions - Amazon AppConfig
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

About Amazon AppConfig extensions

This topic introduces Amazon AppConfig extension concepts and terminology. The information is discussed in the context of each step required to set up and use Amazon AppConfig extensions.

Step 1: Determine what you want to do with extensions

Do you want to receive a notification to a webhook that sends messages to Slack anytime an Amazon AppConfig deployment completes? Do you want to back up a configuration profile to an Amazon Simple Storage Service (Amazon S3) bucket before a configuration is deployed? Do you want to scrub configuration data for sensitive information before the configuration is deployed? You can use extensions to perform these types of tasks and more. You can create custom extensions or use the Amazon authored extensions included with Amazon AppConfig.

Note

For most use cases, to create a custom extension, you must create an Amazon Lambda function to perform any computation and processing defined in the extension. For more information, see Walkthrough: Creating custom Amazon AppConfig extensions.

The following Amazon authored extensions can help you quickly integrate configuration deployments with other services. You can use these extensions in the Amazon AppConfig console or by calling extension API actions directly from the Amazon CLI, Amazon Tools for PowerShell, or the SDK.

Extension Description

Amazon CloudWatch Evidently A/B testing

This extension allows your application to assign variations to user sessions locally instead of by calling the EvaluateFeature operation. For more information, see Working with the Amazon CloudWatch Evidently extension.

Amazon AppConfig deployment events to EventBridge

This extension sends events to the EventBridge default event bus when a configuration is deployed.

Amazon AppConfig deployment events to Amazon Simple Notification Service (Amazon SNS)

This extension sends messages to an Amazon SNS topic that you specify when a configuration is deployed.

Amazon AppConfig deployment events to Amazon Simple Queue Service (Amazon SQS)

This extension enqueues messages into your Amazon SQS queue when a configuration is deployed.

Integration extension—Atlassian Jira

This extensions allows Amazon AppConfig to create and update issues whenever you make changes to a feature flag.

Step 2: Determine when you want the extension to run

An extension defines one or more actions that it performs during an Amazon AppConfig workflow. For example, the Amazon authored Amazon AppConfig deployment events to Amazon SNS extension includes an action to send a notification to an Amazon SNS topic. Each action is invoked either when you interact with Amazon AppConfig or when Amazon AppConfig is performing a process on your behalf. These are called action points. Amazon AppConfig extensions support the following action points:

  • PRE_CREATE_HOSTED_CONFIGURATION_VERSION

  • PRE_START_DEPLOYMENT

  • ON_DEPLOYMENT_START

  • ON_DEPLOYMENT_STEP

  • ON_DEPLOYMENT_BAKING

  • ON_DEPLOYMENT_COMPLETE

  • ON_DEPLOYMENT_ROLLED_BACK

Extension actions configured on PRE_* action points are applied after request validation, but before Amazon AppConfig performs the activity that corresponds to the action point name. These action invocations are processed at the same time as a request. If more than one request is made, action invocations run sequentially. Also note that PRE_* action points receive and can change the contents of a configuration. PRE_* action points can also respond to an error and prevent an action from happening.

An extension can also run in parallel with an Amazon AppConfig workflow by using an ON_* action point. ON_* action points are invoked asynchronously. ON_* action points don't receive the contents of a configuration. If an extension experiences an error during an ON_* action point, the service ignores the error and continues the workflow.

Step 3: Create an extension association

To create an extension, or configure an Amazon authored extension, you define the action points that invoke an extension when a specific Amazon AppConfig resource is used. For example, you can choose to run the Amazon AppConfig deployment events to Amazon SNS extension and receive notifications on an Amazon SNS topic anytime a configuration deployment is started for a specific application. Defining which action points invoke an extension for a specific Amazon AppConfig resource is called an extension association. An extension association is a specified relationship between an extension and an Amazon AppConfig resource, such as an application or a configuration profile.

A single Amazon AppConfig application can include multiple environments and configuration profiles. If you associate an extension to an application or an environment, Amazon AppConfig invokes the extension for any workflows that relate to the application or environment resources, if applicable.

For example, say you have an Amazon AppConfig application called MobileApps that includes a configuration profile called AccessList. And say the MobileApps application includes Beta, Integration, and Production environments. You create an extension association for the Amazon authored Amazon SNS notification extension and associate the extension to the MobileApps application. The Amazon SNS notification extension is invoked anytime the configuration is deployed for the application to any of the three environments.

Note

You don't have to create an extension to use Amazon authored extensions, but you do have to create an extension association.

Step 4: Deploy a configuration and verify the extension actions are performed

After you create an association, when a hosted configuration is created or a configuration is deployed, Amazon AppConfig invokes the extension and performs the specified actions. When an extension is invoked, if the system experiences an error during a PRE-* action point, Amazon AppConfig returns information about that error.