Check out a free preview of the full Serverless with AWS Lambda course

The "Deploy on AWS Solution" Lesson is part of the full, Serverless with AWS Lambda course featured in this preview video. Here's what you'd learn in this lesson:

Scott walks through the solution to the Deploy on AWS Exercise by showing how to deploy Lambdas to AWS. Scott takes questions from students.

Preview
Close

Transcript from the "Deploy on AWS Solution" Lesson

[00:00:00]
>> Scott: Welcome back. I hope everyone was able to deploy their lambda functions to AWS, and got to follow this in traps, and then dig their way out of it, and maybe have some pretty interesting questions to ask. So there really isn't a solution there, cuz I already showed you how to deploy before I left.

[00:00:19]
So I would leave this open to now that you have deployed, and you looked at some of the resources, and you ran into some troubles, what are some questions you might have around that deployment, and some of the issues that you ran into that I could probably alleviate?

[00:00:32]
>> Scott: I know we had one about DPC, so I'm gonna take a quick dive into that without giving to so much Amazon. But basically, there is a service called VPC, which somebody should make a startup around this one. Which is basically a virtual private Cloud. So whenever you make an AWS account, you automatically get one VPC automatically.

[00:00:54]
You get this nice Internet gateway automatically. You get a few subnets. So you pretty much already have all the resources you need to connect your lambda to the Internet. Cuz all you really need is a VPC, some subnets, which are like different nets across regions that you can use for.

[00:01:10]
And then, the Internet gateway to expose yourself to the Internet. So if you wanted to see what was in a VPC, you could just click on it. And let's see, does it show you in here? Actually, I don't now if it's gonna show you in here.
>> Scott: I don't think there is one place where you can go look to see, wait, VPC connections.

[00:01:32]
Here we go. Yeah, so if I had it, something connected to, this is a VPN. Nevermind. Yeah, I don't know if there is one place you can see everything connected to a VPC. I think you have to individually go to the resource itself and see if it's connected to that VPC.

[00:01:45]
And again, that's just Amazon and their GUI. But yeah, if you wanted to connect your lambda, then yeah, you would
>> Scott: I don't want to get into, there's a lot of stuff you would have to do to connect all this stuff together. But yes, you would have to connect the lambda to the VPC.

[00:02:01]
Few subnets in some regions, and then Internet gateway. I can link everyone to a medium post that explains it beautifully if you want to check that out. It's actually in the service docs. if you go to the service docs, they have it in there.
>> Scott: Where am I at?

[00:02:21]
>> Scott: There we go, okay. Any other questions on deployment? Anybody have any troubles? Any specific things came up?
>> Scott: So everybody deployed easily?
>> Scott: No friction?
>> Speaker 2: There are some friction.
>> Scott: What'd you have friction with?
>> Speaker 2: Initially, it was trying to figure out how to switch regions.

[00:02:43]
Because it was overriding the region that I was in. And then also, just kind of getting that credentials file set up properly. But once you just kind of like cat it out or open it up in your editor, it actually becomes pretty clear to get those credentials in there.

[00:03:02]
>> Scott: Yeah.
>> Speaker 2: And that was super helpful in making it, so you don't have to just export. Cuz the other thing I was wondering is that if you export an environment variable in your terminal, that's gonna disappear when you close it, right?
>> Scott: Yes.
>> Speaker 2: So you would have to do that every time, or import it [CROSSTALK]

[00:03:15]
>> Scott: Import it in your bash, yeah.
>> Scott: Yeah, those can be a nuance, those things like that. And then sometimes, if you have multiple AWS accounts, you forget what's going on. And, yeah, it's really bad. So that's why I got that little tool that I had, this profile manager, that kinda helps with some of that.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now