1 00:00:00,000 --> 00:00:02,040 ‫Talk about AWS Amplify. 2 00:00:02,040 --> 00:00:04,470 ‫And Amplify is a service that in a gist 3 00:00:04,470 --> 00:00:07,380 ‫allows you to create mobile and web applications, 4 00:00:07,380 --> 00:00:09,480 ‫and it's made of different components. 5 00:00:09,480 --> 00:00:11,100 ‫We have Amplify Studio, 6 00:00:11,100 --> 00:00:14,280 ‫which allows you to visually build a full stack app 7 00:00:14,280 --> 00:00:16,680 ‫both the front-end UI and the backend. 8 00:00:16,680 --> 00:00:19,470 ‫We have the Amplify CLI to do the exact same thing 9 00:00:19,470 --> 00:00:21,540 ‫but with the CLI. 10 00:00:21,540 --> 00:00:24,090 ‫Then we have the Amplify Libraries to connect your app 11 00:00:24,090 --> 00:00:26,280 ‫to existing AWS services, such as 12 00:00:26,280 --> 00:00:29,190 ‫Cognito for login or S3 for storage and so on. 13 00:00:29,190 --> 00:00:30,960 ‫And then Amplify Hosting, 14 00:00:30,960 --> 00:00:33,630 ‫which is to host your Amplify application 15 00:00:33,630 --> 00:00:36,720 ‫on AWS and deliver it very, very fast. 16 00:00:36,720 --> 00:00:37,770 ‫So it can be quite complicated 17 00:00:37,770 --> 00:00:41,100 ‫but let's go step by step to understand these components. 18 00:00:41,100 --> 00:00:44,670 ‫So AWS Amplify first is a set of tools 19 00:00:44,670 --> 00:00:47,160 ‫to get started with mobile and web applications. 20 00:00:47,160 --> 00:00:48,300 ‫And you should think of it 21 00:00:48,300 --> 00:00:52,020 ‫as the elastic beanstalk for mobile and web applications. 22 00:00:52,020 --> 00:00:54,990 ‫So we start with Amplify Studio or the CLI, 23 00:00:54,990 --> 00:00:57,450 ‫and for the CLI we type amplify in it, 24 00:00:57,450 --> 00:01:00,360 ‫and it initializes our Amplify application. 25 00:01:00,360 --> 00:01:03,030 ‫So Amplify gives us must have features such as 26 00:01:03,030 --> 00:01:04,980 ‫data storage, authentication, 27 00:01:04,980 --> 00:01:08,430 ‫storage of data of files overall, and machine learning. 28 00:01:08,430 --> 00:01:10,710 ‫All of this powered by AWS services. 29 00:01:10,710 --> 00:01:13,947 ‫So in the backend, Amplify is relying on DynamoDB, 30 00:01:13,947 --> 00:01:18,947 ‫AWS AppSync for GraphQL APIs, Cognito, Amazon S3, and so on. 31 00:01:20,160 --> 00:01:22,740 ‫And then Amplify also gives you front end libraries. 32 00:01:22,740 --> 00:01:24,960 ‫They're ready to use for different frameworks such as 33 00:01:24,960 --> 00:01:29,070 ‫React, View, JavaScript, iOS, Android, Flutter, and so on. 34 00:01:29,070 --> 00:01:31,950 ‫And so AWS Amplify is going to be a one-stop shop 35 00:01:31,950 --> 00:01:33,990 ‫to integrate all these things together. 36 00:01:33,990 --> 00:01:36,000 ‫It incorporates the best practices 37 00:01:36,000 --> 00:01:39,330 ‫for reliability, security, and scalability. 38 00:01:39,330 --> 00:01:41,100 ‫And then to deploy this application 39 00:01:41,100 --> 00:01:44,430 ‫we can use the Amplify CLI or Amplify Studio. 40 00:01:44,430 --> 00:01:45,840 ‫And the exam may ask you about 41 00:01:45,840 --> 00:01:47,640 ‫some important features of Amplify. 42 00:01:47,640 --> 00:01:48,810 ‫So here they are. 43 00:01:48,810 --> 00:01:50,460 ‫The first one is that Amplify gives you 44 00:01:50,460 --> 00:01:52,320 ‫authentication out of the box. 45 00:01:52,320 --> 00:01:54,780 ‫For this, we do amplify add auth, 46 00:01:54,780 --> 00:01:57,780 ‫and this is leveraging the Amazon Cognito. 47 00:01:57,780 --> 00:02:00,930 ‫You get user registration, authentication, account recovery, 48 00:02:00,930 --> 00:02:02,340 ‫and other operations. 49 00:02:02,340 --> 00:02:05,460 ‫It supports MFA, social signing, et cetera, et cetera. 50 00:02:05,460 --> 00:02:08,310 ‫And you get pre-built components to build this 51 00:02:08,310 --> 00:02:10,710 ‫in your front end and integrate with Cognito. 52 00:02:10,710 --> 00:02:13,890 ‫And finally you get your fine grain authorization. 53 00:02:13,890 --> 00:02:16,369 ‫The second feature is around the datastore. 54 00:02:16,369 --> 00:02:19,620 ‫So you do amplify add api, and it's going to leverage 55 00:02:19,620 --> 00:02:23,130 ‫Amazon App Sync for the API and Amazon DynamoDB 56 00:02:23,130 --> 00:02:24,720 ‫for the data storage. 57 00:02:24,720 --> 00:02:26,310 ‫And the idea is that with Data Store, 58 00:02:26,310 --> 00:02:28,350 ‫you work with local data, 59 00:02:28,350 --> 00:02:31,020 ‫and then you have automatic synchronization to the cloud 60 00:02:31,020 --> 00:02:34,320 ‫without any complex code thanks to the Amplify framework. 61 00:02:34,320 --> 00:02:37,530 ‫It's powered by GraphQL and AppSync overall, 62 00:02:37,530 --> 00:02:40,500 ‫and it gives you offline and realtime capabilities, 63 00:02:40,500 --> 00:02:43,893 ‫and you can even model your data with the Amplify Studio. 64 00:02:44,970 --> 00:02:47,903 ‫Finally, we get Amplify Hosting. And this is when you want 65 00:02:47,903 --> 00:02:49,410 ‫to start deploying your application. 66 00:02:49,410 --> 00:02:53,250 ‫So you do amplify add hosting, and it allows you to 67 00:02:53,250 --> 00:02:55,170 ‫build and host modern web apps. 68 00:02:55,170 --> 00:02:58,380 ‫You do CICD, such as build test and deploy. 69 00:02:58,380 --> 00:03:00,300 ‫You do your pull request previews, 70 00:03:00,300 --> 00:03:03,120 ‫you have your custom domains, you can have monitoring, 71 00:03:03,120 --> 00:03:05,160 ‫you can set up redirects and custom headers 72 00:03:05,160 --> 00:03:07,590 ‫and password protection. So it looks like, 73 00:03:07,590 --> 00:03:10,110 ‫for example if you know competing services such as 74 00:03:10,110 --> 00:03:13,770 ‫Netlify Reversal, Amplify Hosting is similar. 75 00:03:13,770 --> 00:03:16,920 ‫And so you're going to get your code somewhere. 76 00:03:16,920 --> 00:03:19,410 ‫So for example, GitHub or Bitbucket, GitLab, 77 00:03:19,410 --> 00:03:20,820 ‫even CodeCommit. 78 00:03:20,820 --> 00:03:23,940 ‫Then your CICD is going to build the front end 79 00:03:23,940 --> 00:03:24,930 ‫in whatever you have 80 00:03:24,930 --> 00:03:28,020 ‫and then deploy it, for example to CloudFront. 81 00:03:28,020 --> 00:03:30,210 ‫And same, you can have the CICD to build 82 00:03:30,210 --> 00:03:34,770 ‫the backend optionally and deploy the backend into Amplify. 83 00:03:34,770 --> 00:03:37,950 ‫Also for Amplify, you have the option of running testing. 84 00:03:37,950 --> 00:03:38,970 ‫And you have two kind of testing, 85 00:03:38,970 --> 00:03:41,910 ‫you have unit testing and end-to-end testing. 86 00:03:41,910 --> 00:03:43,710 ‫So you can run end-to-end testings 87 00:03:43,710 --> 00:03:45,720 ‫in the test phase in Amplify. 88 00:03:45,720 --> 00:03:47,610 ‫And the goal of doing end-to-end test 89 00:03:47,610 --> 00:03:49,530 ‫is that you can catch regressions 90 00:03:49,530 --> 00:03:51,900 ‫before pushing code to production. 91 00:03:51,900 --> 00:03:55,020 ‫So you use the test step to run any test commands 92 00:03:55,020 --> 00:03:57,420 ‫at build time and you define the test steps 93 00:03:57,420 --> 00:04:00,420 ‫in your amplify.yml file. 94 00:04:00,420 --> 00:04:03,420 ‫And then you can use the Cypress testing framework 95 00:04:03,420 --> 00:04:05,250 ‫to generate your end-to-end test. 96 00:04:05,250 --> 00:04:07,890 ‫The benefits of using the Cypress testing framework 97 00:04:07,890 --> 00:04:10,830 ‫is that you're gonna get a UI report for your test, 98 00:04:10,830 --> 00:04:12,780 ‫and you can define web clicks. 99 00:04:12,780 --> 00:04:15,930 ‫So Cypress can generate and simulate a web browser 100 00:04:15,930 --> 00:04:17,167 ‫and you can just say, 101 00:04:17,167 --> 00:04:19,200 ‫"Click here, do this, do that and do that," 102 00:04:19,200 --> 00:04:20,970 ‫and then verify whether or not that works. 103 00:04:20,970 --> 00:04:21,930 ‫And that's called end-to-end test 104 00:04:21,930 --> 00:04:24,810 ‫because we deploy the application and we verify 105 00:04:24,810 --> 00:04:28,020 ‫whether or not the application is working as expected 106 00:04:28,020 --> 00:04:30,870 ‫from a usability standpoint. 107 00:04:30,870 --> 00:04:34,560 ‫So just to summarize, you have build level tests, 108 00:04:34,560 --> 00:04:36,810 ‫which is when you are running unit tests 109 00:04:36,810 --> 00:04:39,270 ‫when you build your application, and this is to test 110 00:04:39,270 --> 00:04:40,103 ‫whether or not your code 111 00:04:40,103 --> 00:04:42,090 ‫is supposed to do what it's supposed to do. 112 00:04:42,090 --> 00:04:43,380 ‫Then you have an end-to-end test, 113 00:04:43,380 --> 00:04:45,000 ‫which is when the app is deployed. 114 00:04:45,000 --> 00:04:47,250 ‫You're going to run end-to-end tests, for example 115 00:04:47,250 --> 00:04:49,470 ‫using the Cypress framework, to make sure that 116 00:04:49,470 --> 00:04:51,600 ‫it behaves the way it's supposed to behave. 117 00:04:51,600 --> 00:04:54,450 ‫And then finally you can deploy your application. 118 00:04:54,450 --> 00:04:56,220 ‫Okay, so that's it for Amplify. 119 00:04:56,220 --> 00:04:59,463 ‫I hope you liked it. And I will see you in the next lecture.