Let's dive in! ๐ช
\nAWS AppConfig, a feature of AWS Systems Manager, enables you to adjust application behavior in production environments quickly and securely without full code deployments. ๐๏ธ
\nIt also supports Feature flags, which allow for the gradual release of new software increments, so you can test and validate features before you roll them out to the whole user base or even before you fully build them. This also allows you to adopt trunk-based development, avoiding large and complex merges and allowing pre-release code to be safely rolled out to production.
\nAs the feature flags are remotely controlled through AppConfig, you can enable and disable them post-deployment without rolling back the code.
\nAt the core of AppConfig are feature flags. These flags are mostly used to control the visibility of a feature in an application
\nThis is done by hiding the new feature behind an if-else statement that can be activated at any point after it is already deployed. This if-else query can also be targeted to a specific user segment, device type, or any other context you define.
\nWith this approach, you can gradually increase the percentage of users that receive the new feature.
\n\n
โ \n |
Before we start with our AppConfig deep dive, letโs look at some software development history. This will help us get a clear picture of why feature flags are so important.
\nThere are different approaches to iterate and deploy software. These include feature branch and trunk-based development.
\nEach of them is a distinct approach to managing code integration and deployment. How do they differ?
\nThese are the two most common approaches to software development that every experienced developer is familiar with.
\nBut thereโs a third approach that is gaining popularity in recent years:
\nFeature Flag Development: Enhances trunk-based development by allowing incomplete features to be merged into the main branch, controlled via feature flags. Parts of a feature can be implemented but remain hidden from users reducing the risk of deploying unfinished features. However, it adds complexity in managing the flags.
\nWhen we look at the three approaches, feature flag-based development is the most flexible and agile.
\nUsing a feature-flag-based, iterative approach in software development isnโt just a nice gimmick or trend. Itโs a game-changer.
\nLetโs have a look at some of the benefits that come with feature flags
\nOverall, feature flags enhance agility and reduce bug risks compared to long-living feature branches.
\nWhat do we need to set up so that we can actually use AWS AppConfig inside of our application?
\nproduction
or preview
. This also refers to a logical grouping of targets, like your backend, web frontend, or mobile app. It can also be more detailed, down to sub-components.Before we really jump into the hands-on part, letโs discuss one further point that is important when using AppConfig with AWS Lambda.
\nWith Lambda, we have an almost unlimited number of execution environments because AWS manages when new instances start and stop. At first glance, this means we need to make many calls to the AppConfig service, and of course, we are billed for each call.
\nFortunately, thereโs the AWS AppConfig Agent Lambda Extension, which we can use right away to help us easily reduce the number of calls we make.
\nThis layer will internally cache our configurations fetched from AppConfig and will automatically keep the cache updated without any action needed from us. This means it doesnโt matter how often we fetch the configuration in our code, as these calls donโt actually result in calls to AppConfig.
\nYes, you read that right. You can easily set up automated rollbacks using CloudWatch Alarms. This is done by attaching a CloudWatch Role (needs to have the cloudwatch:DescribeAlarm
action allowed) ARN and one or several CloudWatch Alarm ARNs to the environment.
If one Alarm is triggered, AppConfig will immediately stop the rollout and roll back to the previous configuration.
\nAfter working with AppConfig for a while, we don't really know why AWS didn't just add the Analytics part of Evidently to CloudWatch as an extension for AppConfig.
\nAppConfig has so many similar features and it works almost identically (even though some things are not quite as fancy as in Evidently), but having two services that do want to do the same thing doesn't sound right.
\nTL;DR: AppConfig is great and you should use it! ๐
\nDon't forget to read the full post which also includes every step on how to set up AppConfig with a simpel feature flag - code included! ๐ค
\n\n\n\n |
โ
\n\n\n | \n
โTobias Schmidt & Sandro Volpicella & from AWS Fundamentalsโ | \n\n |
\n | \n You're receiving this email because you're part of our awesome community! \nIf you'd prefer not to receive updates, you can easily unsubscribe anytime by clicking here: Unsubscribe \nโ \nOur address: Dr.-Otto-Bรถรner-Weg 7a, Ottobrunn, Bavaria 85521 \n | \n\n |
|
Join our community of over 9,300 readers delving into AWS. We highlight real-world best practices through easy-to-understand visualizations and one-pagers. Expect a fresh newsletter edition every two weeks.
โ Reading time: 8 minutes ๐ Main Learning: Federated Authentication with Cognito ๐พ GitHub Repository โ๏ธ Read the Full Post Online ๐ Hey Reader ๐๐ฝ Federated Authentication lets users sign in to your app using their existing accounts - most prominently Google! This approach eliminates the need to create and remember new credentials (which most users are very happy for! โจ), improving user experience and likely increasing conversion rates. ๐ With OAuth 2.0 and Google as an identity provider, we...
Hey Reader ๐๐ฝ This issue will be about a recent real-world experience that just went off right with the new year! ๐ Once upon a time... ๐ฆ It all started in September 2024 where Edgio, the main CDN provider we used for one of my large enterprise projects, filed for bankruptcy. Edgio was natively integrated into Azure, allowing you to use it without leaving the Azure ecosystem. It also featured a powerful rules engine (allowing for all kinds of conditions, redirects and rewrites) and didnโt...
โ Reading time: 13 minutes ๐ Main Learning: How to Run Apps on Fargate via ECS ๐พ GitHub Repository โ๏ธ Read the Full Post Online ๐ Hey Reader ๐๐ฝ When building applications on AWS, we need to run our code somewhere: a computation service. There are a lot of well-known and mature computation services on AWS. Youโll often find Lambda as the primary choice, as itโs where you donโt need to manage any infrastructure. You only need to bring your code - itโs Serverless โก๏ธ. However, more options can be...