1 00:00:00,960 --> 00:00:03,510 ‫So let's practice using AWS Cloud9. 2 00:00:03,510 --> 00:00:05,640 ‫For this, you go into the Cloud9 console 3 00:00:05,640 --> 00:00:07,410 ‫and you create an environment. 4 00:00:07,410 --> 00:00:09,570 ‫Now, this is going to be within the free tier, 5 00:00:09,570 --> 00:00:12,030 ‫if you have still the free tier available to you, 6 00:00:12,030 --> 00:00:13,920 ‫and you're going to use a T2 Micro. 7 00:00:13,920 --> 00:00:16,520 ‫So I will create an environment, call it DemoCloud9, 8 00:00:18,300 --> 00:00:19,920 ‫and then for the environment type 9 00:00:19,920 --> 00:00:22,410 ‫you can either choose a new EC2 instance 10 00:00:22,410 --> 00:00:26,310 ‫or an existing instance that you want to deploy Cloud 9 to. 11 00:00:26,310 --> 00:00:28,380 ‫But we'll use a new EC2 instance. 12 00:00:28,380 --> 00:00:30,690 ‫And then for this instance, we'll use a T2 Micro, 13 00:00:30,690 --> 00:00:33,090 ‫which is going to be free tier eligible. 14 00:00:33,090 --> 00:00:34,850 ‫We'll use Amazon S2, and there's a timeout 15 00:00:34,850 --> 00:00:37,890 ‫of 30 minutes, which means that after 30 minutes 16 00:00:37,890 --> 00:00:40,890 ‫the instance will go into hibernation. 17 00:00:40,890 --> 00:00:43,530 ‫Next we go under how the network setting, 18 00:00:43,530 --> 00:00:44,760 ‫how to connect to your instance 19 00:00:44,760 --> 00:00:46,260 ‫and actually interact with it. 20 00:00:46,260 --> 00:00:50,310 ‫So you can either use SSH, but this will open ports for you, 21 00:00:50,310 --> 00:00:52,410 ‫or you can use Systems Manager 22 00:00:52,410 --> 00:00:53,910 ‫and this will create a few roles 23 00:00:53,910 --> 00:00:55,590 ‫but then we can connect directly 24 00:00:55,590 --> 00:00:57,840 ‫without opening any inbound ports 25 00:00:57,840 --> 00:01:00,450 ‫on our underlying EC2 instance. 26 00:01:00,450 --> 00:01:03,600 ‫So we'll use Systems Manager and then for VPC settings 27 00:01:03,600 --> 00:01:05,670 ‫this is where your instance is going to be deployed 28 00:01:05,670 --> 00:01:07,320 ‫so it shows your VPC and then 29 00:01:07,320 --> 00:01:09,600 ‫if you have a subnet preference or not. 30 00:01:09,600 --> 00:01:12,240 ‫So let's click on Create, and this will actually create 31 00:01:12,240 --> 00:01:14,490 ‫an EC2 instance and then deploy Cloud9 on it. 32 00:01:14,490 --> 00:01:16,710 ‫So let's just wait a little bit. 33 00:01:16,710 --> 00:01:18,960 ‫Okay, so my demo environment is not created 34 00:01:18,960 --> 00:01:21,330 ‫so I can just click on open in Cloud9. 35 00:01:21,330 --> 00:01:23,730 ‫And as you can see, it's going to load a web browser 36 00:01:23,730 --> 00:01:25,830 ‫and Cloud9 is going to be on it. 37 00:01:25,830 --> 00:01:27,180 ‫So here we are in Cloud9. 38 00:01:27,180 --> 00:01:28,470 ‫It is very handy. 39 00:01:28,470 --> 00:01:29,580 ‫So what do we have? 40 00:01:29,580 --> 00:01:32,490 ‫We have a terminal here, and this terminal actually 41 00:01:32,490 --> 00:01:35,250 ‫already is configured with AWS credentials. 42 00:01:35,250 --> 00:01:38,910 ‫So if I do aws s3 ls, for example, 43 00:01:38,910 --> 00:01:41,190 ‫it's going to list all my buckets in my account. 44 00:01:41,190 --> 00:01:44,040 ‫So this comes preconfigured with managed credentials, 45 00:01:44,040 --> 00:01:45,300 ‫but if you wanted to disable them, 46 00:01:45,300 --> 00:01:48,720 ‫you would go under Preferences, scroll down, 47 00:01:48,720 --> 00:01:51,420 ‫you'd look at settings for AWS, 48 00:01:51,420 --> 00:01:52,860 ‫and then you could disable 49 00:01:52,860 --> 00:01:55,440 ‫the AWS-managed temporary credentials. 50 00:01:55,440 --> 00:01:57,660 ‫But we'll keep them because they're very handy. 51 00:01:57,660 --> 00:01:58,860 ‫Here on the left hand side 52 00:01:58,860 --> 00:02:02,220 ‫you can actually look at your directory structure 53 00:02:02,220 --> 00:02:04,020 ‫and we have the README file right here 54 00:02:04,020 --> 00:02:07,770 ‫that we can edit if we wanted to, which is super handy. 55 00:02:07,770 --> 00:02:10,290 ‫And you can go ahead and create any kind of file 56 00:02:10,290 --> 00:02:13,440 ‫you wanted to or folders or stuff like that. 57 00:02:13,440 --> 00:02:16,320 ‫So this is a IDE on the cloud 58 00:02:16,320 --> 00:02:18,330 ‫so you can actually do all the things you would do 59 00:02:18,330 --> 00:02:20,610 ‫with an IDE, such as edit, et cetera, et cetera. 60 00:02:20,610 --> 00:02:22,860 ‫You can even run your code if you wanted to. 61 00:02:22,860 --> 00:02:26,640 ‫You can have tools to have micros and so on. 62 00:02:26,640 --> 00:02:28,170 ‫On the left hand side, you have, 63 00:02:28,170 --> 00:02:30,810 ‫if you're using source control such as Git, 64 00:02:30,810 --> 00:02:32,310 ‫you can actually initialize a repo 65 00:02:32,310 --> 00:02:34,890 ‫or clone one or manage source control from there 66 00:02:34,890 --> 00:02:37,260 ‫such as adding and committing and pushing. 67 00:02:37,260 --> 00:02:40,110 ‫You have the AWS Explorer where you can actually 68 00:02:40,110 --> 00:02:42,180 ‫explore all the resources 69 00:02:42,180 --> 00:02:44,850 ‫within your environment directly from the Cloud9 console. 70 00:02:44,850 --> 00:02:47,520 ‫So here I have an API and API Gateway. 71 00:02:47,520 --> 00:02:49,320 ‫If I go to ECR, I have, for example, 72 00:02:49,320 --> 00:02:51,960 ‫this ECR repo available to me and so on, 73 00:02:51,960 --> 00:02:53,220 ‫so that's very handy. 74 00:02:53,220 --> 00:02:55,110 ‫Here are all my S3 buckets. 75 00:02:55,110 --> 00:02:57,660 ‫So all of this can be explored again within Cloud9, 76 00:02:57,660 --> 00:02:59,340 ‫which is super cool. 77 00:02:59,340 --> 00:03:00,510 ‫And you have developer tools 78 00:03:00,510 --> 00:03:04,140 ‫such as the CDK or Code Whisperer. 79 00:03:04,140 --> 00:03:05,070 ‫On the right hand side, 80 00:03:05,070 --> 00:03:07,560 ‫you can actually share your environment with people. 81 00:03:07,560 --> 00:03:09,840 ‫So here is the links to share 82 00:03:09,840 --> 00:03:12,030 ‫and then you can say who has read/write access 83 00:03:12,030 --> 00:03:13,770 ‫to it and so on, so you can invite 84 00:03:13,770 --> 00:03:16,260 ‫specific IAM usernames and then, 85 00:03:16,260 --> 00:03:17,910 ‫or create a user, and then you invite them 86 00:03:17,910 --> 00:03:18,743 ‫and they will have access 87 00:03:18,743 --> 00:03:20,850 ‫to the same environment as you, which is awesome 88 00:03:20,850 --> 00:03:23,820 ‫because then you can do some pair programming. 89 00:03:23,820 --> 00:03:25,770 ‫Finally, you have your files outlined 90 00:03:25,770 --> 00:03:27,720 ‫if this is relevant and the debugger 91 00:03:27,720 --> 00:03:29,970 ‫if you wanted to run stuff and debug. 92 00:03:29,970 --> 00:03:31,860 ‫Finally, the Preference pane is here. 93 00:03:31,860 --> 00:03:34,320 ‫So as you can see, it is a full-blown cloud IDE, 94 00:03:34,320 --> 00:03:36,060 ‫which is very exciting. 95 00:03:36,060 --> 00:03:39,630 ‫Now, if we go back to this console of AWS 96 00:03:39,630 --> 00:03:44,070 ‫and I go into EC2, I can see that one instance is running. 97 00:03:44,070 --> 00:03:45,900 ‫This is the instance that gets created 98 00:03:45,900 --> 00:03:48,960 ‫by Cloud9 and it's properly configured, 99 00:03:48,960 --> 00:03:51,000 ‫and as you can see, it is managed here. 100 00:03:51,000 --> 00:03:53,580 ‫So this is how Cloud9 is actually running. 101 00:03:53,580 --> 00:03:57,660 ‫So to be done, just take your environment and delete it 102 00:03:57,660 --> 00:03:58,950 ‫and we're good to go because we're now going 103 00:03:58,950 --> 00:04:00,960 ‫to start developing stuff in the cloud right now, 104 00:04:00,960 --> 00:04:05,130 ‫but you get the idea of the capability behind Cloud9. 105 00:04:05,130 --> 00:04:06,540 ‫Okay, that's it for this lecture. 106 00:04:06,540 --> 00:04:09,693 ‫I hope you liked it, and I will see you in the next lecture.