1. Home
  2. Training Library
  3. Amazon Web Services
  4. Courses
  5. Certified Developer for AWS- Deployment and Security

Amazon CodeCommit

play-arrow
Start course
Overview
DifficultyIntermediate
Duration1h 59m
Students1335

Description

In this course we learn to

Recognize and implement secure procedures for optimum cloud deployment and maintenance.
Demonstrate ability to implement the right architecture for development, testing, and staging environments. 

Shared Security model
Compliance and best practices
Identity and Access Management (IAM)
Protecting data at Rest / In Transit
Identity Federation
Threat Mitigation
Amazon CloudFront Security

Deployment Services

Demonstrate ability to implement the right architecture for development, testing, and staging environments.
Understand the core AWS services, uses, and basic architecture best practices
Amazon CodeDeploy
Amazon CodePipeLine
Amazon CodeCommit

If you have thoughts or suggestions for this course, please contact Cloud Academy at support@cloudacademy.com.

Transcript

Hi. In this lecture, we will explore CodeCommit. CodeCommit is a fully manager source control service that AWS provides. AWS ensures security by encrypting all the repositories that you create. Actually, there is no option to create a non-encrypted repository. It's high available. It was built on top of S3 and DynamoDB, which are high-available services by design. You can store anything in the CodeCommit repository. Meaning that you can store any type of files that you want and also, there is no size limit for the repositories. And last, but not least, it makes use of Git, a well-known source control system that you probably are familiar with.

By using CodeCommit, you will be billed in a monthly basis. It will cost $1 per active user per month. You will have 10 gigabytes of storage per month and 2,000 Git requests. In case you exceed these limits, you'll pay an additional fee for it. So now let's go to the AWS console and have a hands-on overview on how it works.

Here at the AWS CodeCommit console, let's click on "get started." And since we don't have any repository created yet, we have to create one in order to use the service.

And our repository is created. If we click on the repository name, we can see that we have no files obviously. And we can see some settings in here. And we have two ways to connect to our repository. We can either connect to it via SSH or HTTPS. In this video, I will connect to this repository via SSH. So we would use this URL. But we can't just simply copy this URL and clone the repository because all repositories on CodeCommit are private. So we need to first configure our credentials on our machine in order to connect to this repository. So let's do this.

In order to connect to our repository, I've created an IEM user. This user is called CodeCommit and it has only an access Git active in his account. The permissions for this user are AWS CodeCommit full access, which is self-explanatory. You need to grant access to your IEM user in order to access and manage a repository. This specific policy will grant full access to this user to the CodeCommit servers. And I also have added a permission that will help me upload an SSH Git to my IEM profile. Because we need to upload the SSH to our IEM user prior trying to connect to our repository via SSH.

So let's do it. Let's now generate an SHH key to our user. I'm in my SSH folder inside my user profile. And now I will create a new pair of SSH keys. I'll name it "codecommit." No password. And it's done. Now we have a couple of new files in here. We need to upload the contents of this file, called "codecommit.pub" to the IEM console. So let me see the contents of this file. In here we could simply copy and paste. Now it's done and notice that we have an SSH key ID. We will need this information.

Now back in the terminal, we should create another file in here. It will be called "config." And we need to insert some information. In here, notice that we need to specify user by his SSH public key ID. So we can simply copy and paste again the SHH key ID. And we will be almost ready to go. We need, also, to change the permissions for this file. And done.

Now that I've copied the SSH URL, let me try to clone this repository. Git clone, nothing new in here. And just wait for the step to complete. And now we have our test folder. We could create a new file in here so let's create a read-me file.

Our file was created and now let's add our changes. Commit, and send our results. Okay. It has also created a new branch. The master branch. And if we refresh this page, we should be able to see the file that we just uploaded. And here it is. "Hello World."

You might remember that I've created the CodeCommit user with full permissions to the CodeCommit service and also a few permissions to the IEM service. Especially to upload the SSH keys. I did it because I believe it's more convenient to deal with this service through the command line. So let's try it out.

First, I will create a new repository. Our repository was created. You can see here that we could clone, right away, the SSH URL or the HTTPS URL. But let's also upload our SHH keys to the IEM service through the command line interface. To do it, we need to have permissions in the IEM service and we need, also, to create another SHH key because if we try to upload, again, the same key, AWS will throw us an arrow. So let's get back to the SSH folder. Okay, and create another key. Sorry, my bad. Okay, I will call it simply, "key." No pass-phrase again. Our file is here and let's upload it.

Here, to avoid the copy and paste, we can simply do this. And our SSH key was uploaded successfully. And we can see here that AWS has returned to us, the SSH key ID. So let me copy this ID. Open, again, our config file. And replace this information. Also, we have to replace the key.

Now, I believe that we are ready to go. Let me copy the SSH address from the repository that we just created and try to clone it. Okay, it was created. Let me create another file. "Hello." Oh, my typing is terrible. Just "Hello." And if we did everything right, we are supposed to see a new repository in here, as well our file. So click on "dashboard." The repository is here. Great. And also, we have our file.

About the Author

Students50913
Courses76
Learning paths28

Andrew is an AWS certified professional who is passionate about helping others learn how to use and gain benefit from AWS technologies. Andrew has worked for AWS and for AWS technology partners Ooyala and Adobe.  His favorite Amazon leadership principle is "Customer Obsession" as everything AWS starts with the customer. Passions around work are cycling and surfing, and having a laugh about the lessons learnt trying to launch two daughters and a few start ups.