AWS::AppConfig::Extension
Creates an Amazon AppConfig extension. An extension augments your ability to inject logic or behavior at different points during the Amazon AppConfig workflow of creating or deploying a configuration.
You can create your own extensions or use the Amazon authored extensions provided by
Amazon AppConfig. For an Amazon AppConfig extension that uses
Amazon Lambda, you must create a Lambda function to perform any
computation and processing defined in the extension. If you plan to create custom versions
of the Amazon authored notification extensions, you only need to specify an Amazon Resource
Name (ARN) in the Uri field for the new extension version.
-
For a custom EventBridge notification extension, enter the ARN of the EventBridge default events in the
Urifield. -
For a custom Amazon SNS notification extension, enter the ARN of an Amazon SNS topic in the
Urifield. -
For a custom Amazon SQS notification extension, enter the ARN of an Amazon SQS message queue in the
Urifield.
For more information about extensions, see Working with Amazon AppConfig extensions in the Amazon AppConfig User Guide.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::AppConfig::Extension", "Properties" : { "Actions" :Json, "Description" :String, "LatestVersionNumber" :Integer, "Name" :String, "Parameters" :{, "Tags" :Key:Value, ...}[ Tag, ... ]} }
YAML
Type: AWS::AppConfig::Extension Properties: Actions:JsonDescription:StringLatestVersionNumber:IntegerName:StringParameters:Tags:Key:Value- Tag
Properties
Actions-
The actions defined in the extension.
Required: Yes
Type: Json
Update requires: No interruption
Description-
Information about the extension.
Required: No
Type: String
Minimum:
0Maximum:
1024Update requires: No interruption
LatestVersionNumber-
You can omit this field when you create an extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field.
Required: No
Type: Integer
Update requires: No interruption
Name-
A name for the extension. Each extension name in your account must be unique. Extension versions use the same name.
Required: Yes
Type: String
Minimum:
1Maximum:
64Update requires: Replacement
Parameters-
The parameters accepted by the extension. You specify parameter values when you associate the extension to an Amazon AppConfig resource by using the
CreateExtensionAssociationAPI action. For Amazon Lambda extension actions, these parameters are included in the Lambda request object.Required: No
Type: Map of Parameter
Update requires: No interruption
Tags-
Adds one or more tags for the specified extension. Tags are metadata that help you categorize resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.
Required: No
Type: List of Tag
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns information about the extension.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Examples
Amazon AppConfig create extension example
An extension augments your ability to inject logic or behavior at different points during the Amazon AppConfig workflow of creating or deploying a configuration. You can create your own extensions or use the Amazon authored extensions provided by Amazon AppConfig. The following extension performs an action using Amazon Lambda (as defined by the Uri field) before a configuration version is created by Amazon AppConfig (as defined by the PRE_CREATE_HOSTED_CONFIGURATION_VERSION action point).
JSON
{ "Resources": { "BasicExtension": { "Type": "AWS::AppConfig::Extension", "Properties": { "Name": "My Test Extension", "Description": "My test extension", "LatestVersionNumber": 0, "Actions": { "PRE_CREATE_HOSTED_CONFIGURATION_VERSION": [ { "Name": "My Test Action", "Uri": "DependentLambda.Arn", "RoleArn": "DependentRole.Arn", "Description": "My test action point" } ] }, "Parameters": { "MyTestParam": { "Required": false, "Description": "My test parameter" } }, "Tags": [ { "Key": "Ext", "Value": "Test" } ] } } } }
YAML
Resources: BasicExtension: Type: AWS::AppConfig::Extension Properties: Name: "My Test Extension" Description: "My test extension" LatestVersionNumber: 0 Actions: PRE_CREATE_HOSTED_CONFIGURATION_VERSION: - Name: "My Test Action" Uri: !GetAtt DependentLambda.Arn RoleArn: !GetAtt DependentRole.Arn Description: "My test action point" Parameters: MyTestParam: Required: false Description: "My test parameter" Tags: - Key: Ext Value: Test