Professional Documents
Culture Documents
Desarrollo Aplicaciones Nube CodeCommit
Desarrollo Aplicaciones Nube CodeCommit
Infrastructure As A Service
Desarrollo de Aplicaciones
en la Nube
Infrastructure As A Service
Table of contents
• Amazon Web Services
• Elastic Cloud Computing
• Simple Storage Server
• Code Deploy
• CodeCommit
• Amazon SDK for Java
• Amazon SDK for Python
AWS CodeCommit
• AWS CodeCommit is a version control service hosted by Amazon Web Services
that you can use to privately store and manage assets (such as documents,
source code, and binary files) in the cloud.
• You can use AWS CodeCommit to store anything from code to binaries.
• AWS CodeCommit is a secure, highly scalable, managed source control service
that hosts private Git repositories.
• It supports the standard functionality of Git, so it works seamlessly with your
existing Git-based tools.
• Sign in to the AWS Management Console and open the IAM console at
https://console.aws.amazon.com/iam/.
• In the IAM console, in the navigation pane, choose Users, and from the list of users, choose
your IAM user.
• On the user details page, choose the Security Credentials tab, and in HTTPS Git credentials
for AWS CodeCommit, choose Generate.
• You cannot choose your own user name or password for Git credentials.
• Copy the user name and password that IAM generated for you, either by showing, copying,
and pasting this information into a secure file on your local computer, or by choosing
Download credentials to download this information as a .CSV file. You will need this
information to connect to AWS CodeCommit.
M.U. Ingeniería Informática E.T.S.I. Informática 8
Desarrollo de Aplicaciones en la Nube
Infrastructure As A Service
• Open a terminal, command line, or Git shell. Using the HTTPS URL you copied, run the git
clone command to clone the repository. For example, to clone a repository named
MyDemoRepo to a local repo named my-demo-repo in the US East (Ohio) region:
git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
• The first time you connect, you will be prompted to provide the user name and password
for the repository. Depending on the configuration of your local computer, this prompt will
either originate from a credential management system for the operating system (for
example, Keychain Access for macOS), a credential manager utility for your version of Git
(for example, the Git Credential Manager included in Git for Windows), your IDE, or Git
itself.
• Provide the user name and password generated for Git credentials in.
M.U. Ingeniería Informática E.T.S.I. Informática 10
Desarrollo de Aplicaciones en la Nube
Infrastructure As A Service
• You can configure access to your AWS CodeCommit repository in AWS Cloud9,
Visual Studio, Eclipse, Xcode, IntelliJ, or any integrated development
environment (IDE) that integrates Git credentials.
• After configuring access, you can edit your code, commit your changes, and
push directly from the IDE or other development tool.
• When prompted by your IDE or development tool for the user name and
password used to connect to the AWS CodeCommit repository, provide the Git
credentials for User name and Password you created in IAM.
Manage Triggers
• You can configure an AWS CodeCommit repository so that code pushes or other events trigger
actions, such as sending a notification from Amazon Simple Notification Service (Amazon SNS) or
invoking a function in AWS Lambda.
• Triggers are commonly configured to:
• Send emails to subscribed users every time someone pushes to the repository.
• Notify an external build system to start a build after someone pushes to the main branch of the repository.
• You must create the resource, Amazon SNS topic or Lambda function, in the same region as the AWS
CodeCommit repository.
• For Amazon SNS topics, you do not need to configure additional IAM policies or permissions if the
Amazon SNS topic is created using the same account as the AWS CodeCommit repository.
• You can configure Lambda functions by creating the trigger in the Lambda console as part of the
function. This is the simplest method, because triggers created in the Lambda console automatically
include the permissions required for AWS CodeCommit to invoke the Lambda function.