1 00:00:00,270 --> 00:00:03,270 ‫So now let's talk about AWS AppConfig. 2 00:00:03,270 --> 00:00:06,090 ‫So the idea is that when you configure your applications, 3 00:00:06,090 --> 00:00:09,480 ‫it is very common for you to actually ship the configuration 4 00:00:09,480 --> 00:00:11,340 ‫alongside your app, 5 00:00:11,340 --> 00:00:14,220 ‫and sometimes you can modularize the configuration 6 00:00:14,220 --> 00:00:15,930 ‫by using environmental variables. 7 00:00:15,930 --> 00:00:18,270 ‫But what if instead you want it to be 8 00:00:18,270 --> 00:00:20,670 ‫having the configuration outside of your app? 9 00:00:20,670 --> 00:00:22,290 ‫For this, you could use AppConfig, 10 00:00:22,290 --> 00:00:24,210 ‫which allows you to configure, validate 11 00:00:24,210 --> 00:00:27,690 ‫and deploy dynamic configurations into your applications. 12 00:00:27,690 --> 00:00:30,330 ‫So you can change this configuration 13 00:00:30,330 --> 00:00:32,880 ‫and your application will change independently 14 00:00:32,880 --> 00:00:36,030 ‫of you deploying any new code to your application. 15 00:00:36,030 --> 00:00:37,620 ‫So you don't need to restart your application, 16 00:00:37,620 --> 00:00:39,210 ‫everything works dynamically. 17 00:00:39,210 --> 00:00:41,310 ‫So the beautiful thing about it is that, for example, 18 00:00:41,310 --> 00:00:42,420 ‫you could use feature flags. 19 00:00:42,420 --> 00:00:43,680 ‫What is a feature flag? 20 00:00:43,680 --> 00:00:46,620 ‫Well say your application comes with a new feature 21 00:00:46,620 --> 00:00:48,720 ‫but for now you want to disable it, 22 00:00:48,720 --> 00:00:50,820 ‫so you just deploy your application, 23 00:00:50,820 --> 00:00:54,900 ‫and in AppConfig you say the feature is off or false. 24 00:00:54,900 --> 00:00:56,820 ‫And then when your application's been deployed 25 00:00:56,820 --> 00:00:58,260 ‫and you're ready to test it out, 26 00:00:58,260 --> 00:01:01,770 ‫you can just change the feature flag in your AppConfig. 27 00:01:01,770 --> 00:01:03,660 ‫Your application will pick it up 28 00:01:03,660 --> 00:01:06,360 ‫and automatically this new feature will be enabled. 29 00:01:06,360 --> 00:01:08,760 ‫On top of it, you can pretty much dynamically change 30 00:01:08,760 --> 00:01:10,290 ‫any kind of configuration, 31 00:01:10,290 --> 00:01:13,500 ‫so you can fine tune your application performance and so on. 32 00:01:13,500 --> 00:01:14,880 ‫You can, even for example, 33 00:01:14,880 --> 00:01:18,960 ‫if you had IP block list or allow list, 34 00:01:18,960 --> 00:01:22,140 ‫you can modify them in real time in AppConfig again, 35 00:01:22,140 --> 00:01:25,260 ‫without changing your application code. 36 00:01:25,260 --> 00:01:26,970 ‫So it's very useful for apps that you run 37 00:01:26,970 --> 00:01:31,140 ‫on EC2 instances, Lambda, ECS, EKS, and so on. 38 00:01:31,140 --> 00:01:33,690 ‫On top of it, if you have a configuration change 39 00:01:33,690 --> 00:01:36,300 ‫for example, let's go back to our feature flag, 40 00:01:36,300 --> 00:01:38,864 ‫you don't want to release the feature 41 00:01:38,864 --> 00:01:39,810 ‫to all of your instances at once. 42 00:01:39,810 --> 00:01:42,180 ‫You may want to gradually deploy this change 43 00:01:42,180 --> 00:01:45,540 ‫to see if you have any issues, and if so, get a rollback. 44 00:01:45,540 --> 00:01:47,790 ‫So that's possible with AppConfig as well. 45 00:01:47,790 --> 00:01:49,920 ‫So AppConfig has a few config sources. 46 00:01:49,920 --> 00:01:51,450 ‫It could be the parameter store, 47 00:01:51,450 --> 00:01:53,160 ‫it could be the SSM documents, 48 00:01:53,160 --> 00:01:55,440 ‫it could be your SRO buckets or somewhere else. 49 00:01:55,440 --> 00:01:57,930 ‫And then your EC2 instances are, 50 00:01:57,930 --> 00:02:00,210 ‫and, of course, the application running on them 51 00:02:00,210 --> 00:02:04,350 ‫are going to regularly pull for configuration changes 52 00:02:04,350 --> 00:02:05,640 ‫and then pull them. 53 00:02:05,640 --> 00:02:08,820 ‫And for example, when we switch change the configuration, 54 00:02:08,820 --> 00:02:10,860 ‫automatically we're going to be monitoring 55 00:02:10,860 --> 00:02:13,710 ‫with CloudWatch if there is anything going wrong. 56 00:02:13,710 --> 00:02:15,540 ‫If so, let's trigger an alarm, 57 00:02:15,540 --> 00:02:17,340 ‫and this alarm will trigger a rollback 58 00:02:17,340 --> 00:02:19,080 ‫of your configuration. 59 00:02:19,080 --> 00:02:21,540 ‫On top of it to make sure that you're not actually 60 00:02:21,540 --> 00:02:23,940 ‫distributing a configuration that is wrong. 61 00:02:23,940 --> 00:02:27,120 ‫You can validate it either using a JSON Schema, 62 00:02:27,120 --> 00:02:29,610 ‫which is going to check whether or not the config adheres 63 00:02:29,610 --> 00:02:33,150 ‫to some specific types and so on, or a Lambda function. 64 00:02:33,150 --> 00:02:34,740 ‫This is when you want to have code 65 00:02:34,740 --> 00:02:37,290 ‫and this code is going to check the parameters 66 00:02:37,290 --> 00:02:38,880 ‫in a more complex way. 67 00:02:38,880 --> 00:02:40,920 ‫And that's it, that's AppConfig. 68 00:02:40,920 --> 00:02:44,043 ‫I hope you liked it and I will see you in the next lecture.