AWS GoT Hack: CodeCommit

To recap, I'm working on a 48-hour hack to help learn about AWS.  My goal is to:

Create a "Game of Thrones" Alexa Skill that allows the user to ask if a character is alive or dead, and responds with an accurate answer.

In the previous post, I set up the AWS Lambda function that backs up the Alexa skill. But I didn't populate the code, because I want to set up a code repository first, and for that I'm going to use AWS CodeCommit.


CodeCommit provides secure Git repositories in the cloud. So does Github, of course. What I'm curious about is how CodeCommit interacts with other AWS services.  I expect it takes advantage of IAM. I hope it can trigger Lambda functions and perhaps automated code deployment services.

I created a new repository and called it "GameOfThronesWikiaSkill". And I cloned it to my local drive (using HTTPS, BTW, just cause it is easier than setting up SSH keys)  Well, I thought it would be easier. But I hadn't finished the "prerequisites":

  1. Create an IAM user and download its credentials
  2. Attach "AWSCodeCommitFullAccess" policy to new user.
  3. Install the AWS Command-Line Interface (CLI). I had to download and run the bundled installer.
  4. Configure AWS CLI.
  5. Configure Git

Now I can clone the repo. I kinda hate this kind of setup...

OK, now I have a repo. Creating the repo was easy, and so was cloning it. Setup sucked, although AWS had really good instructions for going about doing it.


I'm not going to do anything with them right now, but CodeCommit has triggers for Lambda functions and Amazon SNS "topics".  I can create triggers for select branches, and a few events: push, or adding or deleting a branch or tag.  I'm sure I can figure out how to use those triggers to automate deployment. although I'm guessing I could create triggers from Github to do the same.

OK. So now I have a repo. I'll add code to it in the next post.