{"id":23303997,"url":"https://github.com/tuyojr/aws_codecommit","last_synced_at":"2026-05-09T04:32:09.942Z","repository":{"id":200819645,"uuid":"706309085","full_name":"tuyojr/aws_CodeCommit","owner":"tuyojr","description":"1hr free AWS training from https://bit.ly/devops-3free on Working with AWS CodeCommit","archived":false,"fork":false,"pushed_at":"2023-10-23T12:50:44.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T23:20:27.637Z","etag":null,"topics":["amazon-linux-2","aws-codecommit","aws-ec2","aws-s3","bash","git","linux"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuyojr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-17T17:35:21.000Z","updated_at":"2023-10-17T18:13:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2766246-85c8-426c-a0c4-3412e71c6dfb","html_url":"https://github.com/tuyojr/aws_CodeCommit","commit_stats":null,"previous_names":["tuyojr/aws_codecommit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tuyojr/aws_CodeCommit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuyojr%2Faws_CodeCommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuyojr%2Faws_CodeCommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuyojr%2Faws_CodeCommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuyojr%2Faws_CodeCommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuyojr","download_url":"https://codeload.github.com/tuyojr/aws_CodeCommit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuyojr%2Faws_CodeCommit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-linux-2","aws-codecommit","aws-ec2","aws-s3","bash","git","linux"],"created_at":"2024-12-20T11:14:35.917Z","updated_at":"2026-05-09T04:32:09.925Z","avatar_url":"https://github.com/tuyojr.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Working with AWS CodeCommit (AWS Training and Certifications Lab)\n\nAWS CodeCommit is a highly scalable, managed source control service that hosts private Git repositories. CodeCommit stores your data in Amazon S3 and Amazon DynamoDB giving your repositories high scalability, availability, and durability. You simply create a repository to store your code. There is no hardware to provision and scale or software to install, configure, and operate.\n\nThis lab demonstrates how to:\n\n- Create a code repository using AWS CodeCommit via the Amazon Management Console\n- Create a local code repository on the Linux instance using git\n- Synchronize a local repository with an AWS CodeCommit repository\n\n## Task 1: Create an AWS CodeCommit repository\n\nIn this task, you use the AWS Management Console to create an AWS CodeCommit repository.\n\n1. At the top of the AWS Management Console, in the search bar, search for and choose `CodeCommit`.\n2. On the __AWS CodeCommit__ page, choose `Create repository`.\n3. On the Create repository page:\n    - For Repository name, enter `My-Repo`.\n    - For Description enter `My first repository`.\n    - Choose `Create`.\n\n![awsCodeCommit_task1](https://github.com/tuyojr/aws_CodeCommit/blob/main/awsCodeCommit_task1.png)\n\n## Task 2: Connect to the Amazon EC2 instance\nAn Amazon EC2 instance has been created for you as part of the lab environment build process. In this task, you connect to the instance using AWS Systems Manager Session Manager.\n\n4. Copy the __Ec2InstanceSessionUrl__ value from the list to the left of these instructions, and then paste it into a new web browser tab.\nA console connection is made to the instance inside your web browser window. A set of commands are run automatically when you connect to the instance that change to the user’s home directory and display the path of the working directory, similar to this:\n\n![awsCodeCommit_task2](https://github.com/tuyojr/aws_CodeCommit/blob/main/awsCodeCommit_task2.png)\n\n## Task 3: Create a local repository using Git\nThis task provides an example of how you would use AWS CodeCommit to synchronize to any local code repository that you might create in your normal production development environment.\n\n5. In the terminal session, run the following command to install the Git client:\n\n```BASH\nsudo yum install -y git\n```\n\n6. Run the following commands to configure the Git credential helper with the AWS credential profile, and allow the Git credential helper to send the path to repositories:\n\n```BASH\ngit config --global credential.helper '!aws codecommit credential-helper $@'\ngit config --global credential.UseHttpPath true\n```\n\n\u003e These commands have no output.\n\nNext, obtain the HTTPS URL of your AWS CodeCommit repository.\n\n7. Return to your web browser tab with the AWS CodeCommit console, which should be on the __My-Repo__ page.\n8. At the upper-right of the page, choose `Clone URL`, and then choose __Clone HTTPS__.\n\nThe repository URL is copied to your clipboard and should look similar to this: _https://git-codecommit.us-east-1.amazonaws.com/v1/repos/My-Repo_.\n\n9. Return to your web browser tab with the terminal session.\n10. Run the following command to clone the __My-Repo__ repository to the instance:\n    - Replace the __CLONE_HTTPS_URL__ placeholder value with the __Clone HTTPS URL__ that you copied previously.\n\n```BASH\ngit clone CLONE_HTTPS_URL\n```\n\nThe output should indicate that you are cloning the My-Repo repository, and that the repository is empty, similar to this:\n\n```BASH\nCloning into 'My-Repo'...\nwarning: You appear to have cloned an empty repository.\n```\n\n## Task 4: Making a code change and first commit to the repo\nIn this task, you create your first commit in your local repo. You create two example files in your local repo, use Git to stage the changes to your local repo, and then commit the changes.\n\n11. Run the following command to change to the My-Repo directory:\n\n```BASH\ncd ~/My-Repo\n```\n\n12. Run the following command to create two files in your local repo:\n\n```BASH\necho \"The domestic cat (Felis catus or Felis silvestris catus) is a small, usually furry, domesticated, and carnivorous mammal.\" \u003ecat.txt\necho \"The domestic dog (Canis lupus familiaris) is a canid that is known as man's best friend.\" \u003edog.txt\n```\n\n13. Run the following command to stage the changes in your local repo and see them staged, then commit those changes:\n\n```BASH\ngit add cat.txt dog.txt\ngit status\ngit commit -m \"Added cat.txt and dog.txt\"\n```\n\n## Task 5: Push your first commit\n\n14. Run the following command to push your commit through the default remote name Git uses for your AWS CodeCommit repository (origin), from the default branch in your local repo (master):\n\n```BASH\ngit push -u origin master\n```\n\nAfter you have pushed code to your AWS CodeCommit repository, you can view the contents using the AWS CodeCommit console.\n\n15. Return to your web browser tab with the AWS CodeCommit console, which should be on the My-Repo page.\n16. Choose your web browser’s refresh button to refresh the page.\nThe two files that you added to your repository should be displayed.\n17. Choose the link for each file to view its contents.\n\n![awsCodeCommit_task3](https://github.com/tuyojr/aws_CodeCommit/blob/main/awsCodeCommit_task3.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuyojr%2Faws_codecommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuyojr%2Faws_codecommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuyojr%2Faws_codecommit/lists"}