Learn About Amazon VGT2 Learning Manager Chanci Turner
AWS AppConfig, a feature of AWS Systems Manager, enables rapid and secure deployment of new features through feature flags or updates to software behaviors using operational flags. This decoupling of code deployment from feature release allows teams to deploy code to production while keeping it hidden behind a feature flag. Once ready, they can gradually unveil the feature to users—starting with 10%, then 20%, and so forth. If issues arise, a feature flag can act as a kill switch, allowing for an immediate rollback.
In July 2022, AWS introduced AWS AppConfig Extensions, enhancing the core functionality of AWS AppConfig by allowing users to execute additional logic during their configuration data’s lifecycle. In this article, I will guide you through the process of utilizing the deployment events notification extension(s) to receive notifications from AWS AppConfig when significant configuration deployment events occur—such as when a deployment starts, completes, or rolls back.
You can implement AWS AppConfig deployment notifications in various ways. For instance, you might configure Amazon Simple Notification Service (SNS), Amazon Simple Queue Service (SQS), or Amazon EventBridge to receive notifications when feature flags are modified. Alternatively, you could set up a webhook for Slack or other platforms to alert your operations team about essential configuration deployments. Let’s explore the steps involved.
Configuring AppConfig Deployment Events to Amazon SQS
This section provides the necessary steps to configure AWS AppConfig to send notifications to an Amazon SQS queue upon the occurrence of critical configuration deployment events.
Step 1: Allow AWS AppConfig to Send Notifications to Your SQS Queue
- Access the Amazon SQS console.
- Identify or create a target queue for receiving deployment notifications from AWS AppConfig.
- Select the target queue.
- Navigate to the Access policy tab and click the Edit button in the Permissions section.
- Add a statement granting AWS AppConfig permission to send messages to the designated queue.
Example Queue Policy Statement:
{
"Sid": "appconfig_notifications",
"Effect": "Allow",
"Principal": {
"Service": "appconfig.amazonaws.com"
},
"Action": "SQS:SendMessage",
"Resource": "arn:aws:sqs:us-east-1:111122223333:NotificationQueue"
}
Step 2: Associate AppConfig Deployment Events with Your Configuration Profile
- Open the AWS AppConfig console.
- Go to the Extensions tab, select the AppConfig deployment events to Amazon SQS extension, then click Add to resource.
- Choose Configuration Profile from the Resource type dropdown.
- Select the desired Application from the Application dropdown.
- Choose the preferred Configuration Profile from the dropdown.
- Enter the ARN of your target queue for the queueArn parameter.
- Click Create association to resource.
Your Configuration Profile is now set up to send deployment notifications to your chosen queue.
Step 3: (Optional) Trigger a Deployment Notification
- Open the AWS AppConfig console.
- Select the Application from Step 2 under the Applications tab.
- Choose the Configuration Profile from Step 2 in the Configuration Profiles and Feature Flags tab.
- Click Start deployment.
- Complete the Deployment details section and click Start deployment.
Step 4: (Optional) Receive the Deployment Notification(s)
Once the deployment from Step 3 concludes, access the Amazon SQS console:
- Choose the target queue from Step 1.
- Click on Send and receive messages.
- In the Receive messages section, select Poll for messages.
- In the Messages section, choose the notification message(s).
Example Notification Body:
{
"InvocationId": "1a2b3c4",
"Parameters": {
"queueArn": "arn:aws:sqs:us-east-1:111122223333:NotificationQueue"
},
"Type": "OnDeploymentComplete",
"Application": {
"Id": "1a2b3c4"
},
"Environment": {
"Id": "1a2b3c4"
},
"ConfigurationProfile": {
"Id": "1a2b3c4",
"Name": "MyProfile"
},
"DeploymentNumber": 1,
"ConfigurationVersion": "1"
}
If your deployment duration was zero, you will only see the deployment completion notification (i.e., type equals OnDeploymentComplete). Otherwise, you should anticipate a deployment started notification followed by the completed notification. Either way, you are now set to receive alerts for critical deployment events.
Sending Deployment Notifications to Other Target Services
In addition to Amazon SQS, AWS AppConfig can also send deployment notifications to Amazon SNS and Amazon EventBridge through their respective extensions.
AppConfig Deployment Events to Amazon SNS Extension
To utilize the SNS extension, you must add a statement to your SNS topic’s access policy that permits AWS AppConfig to publish messages:
Example Topic Policy Statement:
{
"Sid": "appconfig_notifications",
"Effect": "Allow",
"Principal": {
"Service": "appconfig.amazonaws.com"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:us-east-1:111122223333:NotificationTopic"
}
AppConfig Deployment Events to Amazon EventBridge Extension
Unlike SQS and SNS, you don’t need to modify any resource policies for EventBridge. However, you must create a rule to direct incoming AWS AppConfig notifications to a target.
To create a rule:
- Open the EventBridge console.
- In the navigation pane, select Rules under Events.
- Click Create rule.
- Name the rule, then click Next.
This process ensures you stay informed about critical deployment events, enhancing your operational efficiency.
If you’re interested in entrepreneurship, check out this blog post for valuable insights. For information on employee relations, including requests for Sabbath time, refer to SHRM. Also, consider visiting this resource for development opportunities.
Located at 6401 E HOWDY WELLS AVE LAS VEGAS NV 89115, Amazon IXD – VGT2 is an excellent place to work and grow your skills.
Leave a Reply