AWS Developer Tools Overview and CodeCommit Cheat Sheet
This blog post acts as an overview of AWS developer tools as well as a CodeCommit cheat sheet. Explore it all in here today.
Jun 08, 2023 • 6 Minute Read
What is AWS Developer Tools?The AWS DevOps Professional Certification Exam has recently been updated and has a new emphasis on the AWS Developer Tools suite. And that might cause concern with new DevOps Pro candidates. What is this “Developer Suite” thing you speak of? How do I start? And how long will it take me to ramp up on this beast?Obviously, we can't kick things off without a few meme references. So, hold my beer and keep calm while you read this blog because the ramp-up to these tools can be pretty quick. First, we'll clearly define the AWS Developer Suite, then break it down piece by piece.AWS Developer Tools is a set of services designed to help developers and IT operations professionals quickly and safely deliver software. Together, these services help securely store and version control your application's source code and automatically build, test, and deploy your application to AWS or your on-premises environment. A lot of keywords and catchphrases in there that are Dev-centric: “DevOps”, “rapidly and safely deliver software”, “source code”, “build, test, deploy”. So the Developer Suite is going to help us build and deploy our software, with automation? Sounds promising, but how do we start? Introduction to Developer ToolsThe AWS Developer Tools Suite provides 6 services:
- AWS Cloud9
- AWS CodeStar
- AWS X-Ray
- AWS CodeCommit
- AWS CodeBuild
- AWS CodeDeploy
- AWS CodePipeline
- Cloud9 is a cloud-based IDE and a good one at that.
- CodeStar allows you to consolidate all of your deployment activities in one place and ties all of your other activities with these tools together.
- X-Ray allows you to analyze and debug your production applications.
Consequently, these are all excellent products and I encourage using them later on, but to ramp up quickly, let’s focus on the rest of the services.AWS CodeCommit, CodeBuild, CodeDeploy, and CodePipeline, used separately or together, form the core services of the Developer Tools Suite. These tools allow you to manage the creation, build, and deployment of your applications end to end. In the first part of this series, we're going to go over CodeCommit.CodeCommit and Git go hand in handCodeCommit is a fully-managed source control service that hosts secure Git-based repositories. So the keywords are fully-managed and Git-based. If you know Git, then you are already ¾ of the way to knowing CodeCommit. Don’t underestimate the fully-managed part. Think of RDS as an example of a fully managed service. AWS manages CodeCommit, saving you from a lot of “under the hood” things like provisioning servers for CodeCommit. OK great, but what’s with the GIT tie-in?Unfamiliar with Git? Check out Git terms explained.As we now know CodeCommit hosts Git repositories, it makes sense that understanding Git commands helps you with CodeCommit. Now, since many of the commands are the same, why not just use Git? What advantages will CodeCommit bring? Remember, AWS manages CodeCommit. CodeCommit eliminates managing your own source control system or scaling its infrastructure. Don’t have the personnel to manage your infrastructure? No problem, AWS does it for you.
Let’s look at some of the Git commands you can use with CodeCommit in the form of a Cheat Sheet: Configuration Variables
Lists all configuration variables: git config --list
Lists all local configuration variables:
git config --local -l
Lists system configuration variables:
git config --system -l
Lists Global configuration variables:
git config --global -l
Remote RepositoriesInitializes a local repo in preparation for connecting it to a CodeCommit repository:
git init
Can be used to set up a connection between a local repo and a remote repository:
git remote add remote-nameremote-url
Creates a local repo by making a copy of a CodeCommit repository at the specified URL, in the specified subfolder of the current folder on the local machine:
git clone remote-urllocal-subfolder-name
Shows the nickname the local repo uses for the CodeCommit repository:
git remote
Shows the nickname and the URL the local repo uses for fetches and pushes to the CodeCommit repository:
git remote -v
Pushes finalized commits from the local repo to the CodeCommit repository, using the specified nickname the local repo has for the CodeCommit repository and the specified branch:
git push -u remote-namebranch-name
Pushes finalized commits from the local repo to the CodeCommit repository after upstream tracking information is set:
git push
Pulls finalized commits to the local repo from the CodeCommit repository, using the specified nickname the local repo has for the CodeCommit repository and the specified branch:
git pull remote-namebranch-name
CommitsShows what has or hasn't been added to the pending commit in the local repo:
git status
Shows changes between the pending commit and the latest commit in the local repo:
git diff HEAD
Adds specific files to the pending commit in the local repo:
git add [file-name-1 file-name-2 file-name-N| file-pattern]
Adds all new, modified, and deleted files to the pending commit in the local repo:
git add
It begins finalizing the pending commit in the local repo, which displays an editor to provide a commit message. The pending commit finalizes after the message is entered:
git commit
Lists recent commits in the local repo:
git log
BranchesLists all branches in the local repo with an asterisk (*) displayed next to your current branch:
git branch
Pulls information about all existing branches in the CodeCommit repository to the local repo:
git fetch
Lists all branches in the local repo and remote tracking branches in the local repo:
git branch -a
Lists only remote tracking branches in the local repo:
git branch -r
Creates a new branch in the local repo using the specified branch name:
git branch new-branch-name
Switches to another branch in the local repo using the specified branch name:
git checkout other-branch-name
Creates a new branch in the local repo using the specified branch name, and then switches to it:
git checkout -b new-branch-name
Pushes a new branch from the local repo to the CodeCommit repository using the specified nickname the local repo has for the CodeCommit repository and the specified branch name:
git push -u remote-name new-branch-name
Creates a new branch in the local repo using the specified branch name. And then connects the new branch in the local repo to an existing branch in the CodeCommit repository, using the specified nickname the local repo has for the CodeCommit repository and the specified branch name:
git branch --track new-branch-nameremote-name/remote-branch-name
Merges changes from another branch in the local repo to the current branch in the local repo:
git merge from-other-branch-name
Deletes a branch in the local repo (unless it contains un-merged work):
git branch -d branch-name
Deletes a branch in the CodeCommit repository using the specified nickname the local repo has for the CodeCommit repository and the specified branch name:
git push remote-name :branch-name
TagsLists all tags in the local repo:
git tag
Pulls all tags from the CodeCommit repository to the local repo:
git fetch --tags
Shows information about a specific tag in the local repo:
git show tag-name
Learn more about version control with Git here.Pushes a specific tag from the local repo to the CodeCommit repository using the specified nickname the local repo has for the CodeCommit repository and the specified tag name:
git push remote-name tag-name
Pushes all tags from the local repo to the CodeCommit repository using the specified nickname the local repo has for the CodeCommit repository:
git push remote-name --tags
To summarize, this deep dive into CodeCommit acts as a cheat sheet for you to use. (Download it here)But there is still a lot of ground to cover in AWS Developer Tools, so this is the first of a multi-part series.
Learn how to develop, deploy, and debug Serverless applications using AWS and pass the AWS Certified Developer – Associate exam. This course is for intermediate-level students and begins with an overview of the fundamentals of Cloud computing. It then moves you through an in-depth curriculum on developing, deploying, and maintaining applications—especially Serverless ones—on AWS.