Check out a free preview of the full AWS for Front-End Engineers (ft. S3, Cloudfront & Route 53) course:
The "Pushing a Change with CI" Lesson is part of the full, AWS for Front-End Engineers (ft. S3, Cloudfront & Route 53) course featured in this preview video. Here's what you'd learn in this lesson:

With a new IAM user set up with a custom restricted AWS policy in place, Steve deploys the course application with Travis CI. Steve takes questions from students.

Get Unlimited Access Now

Transcript from the "Pushing a Change with CI" Lesson

>> Steve Kinney: Now what is this gonna do? By pushing commit to master, it is going to trigger our build process, which is going to get all the assets. It's gonna run the tests, it's gonna build the app. It's gonna push it to S3, it's gonna invalidate CloudFront, right. So we should get all of those things.

[00:00:16] And once just for the act of merging to master. So once you have a good CI/CD set up in place, you're able to just simply not think about a lot of the details before. You set up this infrastructure, but then it just becomes a thing that exists. And you don't necessarily have to go and, all right, I have to remember this concoction of AWS commands and tweak these settings, so on and so forth.

[00:00:37] So we can see that build number 3 started. It's been going for about 21 seconds. You can see the AWS access key is secure, but we have the S3 bucket. I have made typos in there before, that is why I choose to see it every time. Because otherwise it's a lot of fun.

[00:00:56] Did you miss a check box? Did you make a typo? It all depends, cool. So if you go directly to the page, you actually see a lot more information. Eventually I can collapse this, but it's basically pulling down everything that it needs.
>> Speaker 2: So you mentioned that it's really nice, because it's gonna abstract that stuff away and CI's gonna do that for you.

[00:01:17] Have you run into maintenance issues where you realize you need to go to change something but nobody remembers how it was set up?
>> Steve Kinney: No, all right, well, the AWS stuff doesn't change that often, right? We have had problems where our integration tests have gotten flakey, and now we can't deploy.

[00:01:39] Or a Docker image comes out of date, right? And those things are tricky and problematic in those cases, right? But we haven't necessarily had, and we'll talk a little bit about infrastructure as code later, too. There are ways that you can, a lot of the stuff we're doing you can automate as well.

[00:01:57] There's both CloudFormation and Terraform that make that really easy as well. But especially, cuz a lot of the front-end stuff that we're doing is relatively industry standard, right? We're not getting too esoterical we're gonna do some squirrely stuff at the end here to solve that client-side routing problem.

[00:02:17] But, generally speaking, it is a set it and forget it thing to the point where the biggest thing we had to do was, before Sangrin made the entire move to AWS, we had a bucket where we were doing this when we had the Rails app. And they were gonna turn off all the old accounts, then we had to figure out, what was the old account?

[00:02:39] That was the level of problem solving, arguably we could have documented that. [LAUGH] So no, I haven't had that issue, which is almost an unsatisfying answer, cuz I can't give you any sage advice. [LAUGH] But also, I guess it's good that I haven't had that issue. Cool, so you can see done, our build exited out, and let's see.

[00:02:57] I should have a few invalidations in place, but we should see one. He goes go to services lit CloudFront.
>> Steve Kinney: If I find my validations, cool, that looks like the one that probably just fired. Let's go ahead and visit the site.
>> Steve Kinney: And we get the new one, right?

[00:03:26] So again, it created the invalidation, we get new stuff from cache. Everything is good, we now have a CI/CD process set up, right? Depending on what you use for your company, it might vary a little bit. But especially if you're making the decision, right? You've seen that it's fairly easy to get this set up.

[00:03:42] And it is one of those things where it's like was it more work than just dragging a file, running it from the command line? Totally, but if you compound the number of times you have to do that, that stuff pays off real fast, right? And so I think part of it is, someone said, yeah, let's set up a CI/CD pipeline.

[00:03:58] You'd be like I don't have a week, right? But clearly that did not take a week, cuz a lot the tooling is really good for that. So we have this in place, and now we've got a build pipeline and ready to rock.