AWS CodeCommit does support Git LFS? - amazon-web-services

I have existing project repo in gitlab. Since the gitlab is running in the server, we have the lfs objects in certain directory. My Doubt is AWS Codecommit does not have seperate server to store any lfs configurations as gitlab or bitbucket. I've to configure the lfs directory in AWS CodeCommit. My Question is "Does AWS CodeCommit supports Git LFS?". If yes,can someone explain how to configure AWS CodeCommit with Git LFS?

Related

Is it possible to configure aws code commit with git desktop

Is it possible to configure aws code commit with git desktop.. i can able to configure this thing with my git extension using aws environment variable. but unable to do it with git desktop..

Deploy to AWS EC2 from AWS S3 via Bitbucket Pipelines

I have a requirement to do CI/CD using Bitbucket Pipelines.
We use Maven to build our code on Bitbucket pipelines and push the artifacts (jars) to AWS S3. The missing link is to figure out a way to get the artifacts from S3 and deploy to our EC2 instance.
It should all work from Bitbucket Pipelines yml - hopefully using Maven plugins.
For pushing the artifacts to S3 we use:
<groupId>com.gkatzioura.maven.cloud</groupId>
<artifactId>s3-storage-wagon</artifactId>
Is there a way/plugin that will download the artifact from S3's bucket and deploy it to EC2 instance specific folder and perhaps call a sh script to run the jars?
Thank you!
Use AWS Code Deploy (https://docs.aws.amazon.com/codedeploy/latest/userguide/welcome.html) to deploy it to the EC2 instance. The trigger for code deploy would be the S3 bucket that you deploy your jars to. You will need to turn S3 versioning on to make it work. Code Deploy has it's own set of hooks that you can use to perform any shell command or run any bat files on the EC2.

How to access Multi-level repo in aws codebuild

I have the following repo structure in AWS code commit.
I have MainRepo folder and inside it has 2 sub-folder inside which respective solution and buildspec.yml file present.
I am trying to build proj1.sln using aws codebuild service.
In Source section of aws codebuild, it allows to select MainRepo only.
How can i select sub-folder Repo1 in aws codebuild?
You should create a new CodeCommit Repository first and create the CodeBuild Project from there.
You can follow the steps as below :
Create a new CodeCommit Repository and copy the repository URL from the CodeCommit console.
Clone the CodeCommit Repository from inside your <MainRepo> directory in the local computer (here I am guessing you have the MainRepo directory in your local machine, if not then you can clone it to your local machine)
You will have a new repo directory (eg. <Repo3>) on your local system inside <MainRepo> directory.
Copy the .git folder from <Repo3\.git> to <Repo1\.git> and you can git push your files from <Repo1> to the CodeCommit Repository.
Then you can build your Artifacts/CodeBuild Projects from the newly created CodeCommit Repository.

Deploying an AWS CodeStar project on a different account

AWS CodeStar lets you spin up CodePipelines and CodeCommit repos to support your project. If I want to build a project in CodeStar and then take the resultant package, how can I deploy that package into another account?
For example, the basic "Python Web Service Lambda" CodeStar template generated these files,
$ ls ./ -R
./:
buildspec.yml index.py README.md template.yml tests
./tests:
test_handler.py
This notably lacks the templates for setting up the CodePipeline that deploys the code. Thus I am left to figure out how to deploy it myself.
How can I deploy the CodeStar templates onto a different AWS account?
You can not. Currently (2019-01-10) The CodeStar functionality is limited. CodeStar Projects can only be created via the web console and can not be imported / exported / codified. Sadly CodeStar is only a web console feature at this time.

AWS CodeCommit Error: git: 'credential-aws' is not a git command

I am new to Amazon Web Services world, and I am implementing Continuous Delivery to the company I work for.
I followed AWS's [instructions to configure CodeCommit Service] (http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html#setting-up-https-windows-account)
Step 1: Initial Configuration for AWS CodeCommit
To create and configure an IAM user for accessing AWS CodeCommit:
I created a new IAM user and gave him AWSCodeCommitFullAccess
To install and configure the AWS CLI :
I installed and configured the credentials doing aws configure.
Setting AWS Access Key ID, AWS Secret Access Key, Default region name to us-east-1 and de
Step 2: Install Git
I installed Git For Windows making sure the Enable Git Credential Manager option was cleared.
Step 3: Set Up the Credential Helper
git config --global credential.helper "!aws codecommit credential-helper $#"
git config --global credential.UseHttpPath true
Executing:
git config --global --edit
My Configuration is:
[http]
sslVerify = false
[credential]<br>
helper = "aws codecommit list-repositories codecommit credential-helper "
UseHttpPath = true
Step 4: Connect to the AWS CodeCommit Console and Clone the Repository
$ git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/teste-git-to-s3<br>
Cloning into 'teste-git-to-s3'...<br>
git: 'credential-aws' is not a git command. See 'git --help'.<br>
Username for 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/teste-git-to-s3': Lucas<br>
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/teste-git-to-s3/': The requested URL returned error: 403
Looking for AWS troubleshooting, I found: Troubleshooting AWS CodeCommit but I couldn't solve it.
How can this be solved?
I think the issue is in your .gitconfig file. Change it to below and it should work.
[credential]
helper = !aws codecommit credential-helper $#
UseHttpPath = true
By the way, if you are using a Bash emulator instead of the Windows command line, you must use single quotes instead of double quotes.
Let me know if this doesn't work.
If you are using cygwin, after you created the repository, click the connect info button, select linux instead of windows, it works on mine.
I experienced this problem with Python 3.8.x - make sure you are using Python 3.7.x instead, as shown in the docs