yuchesc.github.io

AWS memo

Do it first when launched EC2.

sudo ln -s /usr/bin/python3 /usr/bin/python && sudo apt-get update && sudo apt-get upgrade -y

Local

Change profile

export AWS_DEFAULT_PROFILE=hogepiyo

CodeCommit

Create CodeCommit

aws codecommit create-repository --repository-name {name} --repository-description {description}

Make develop branch

Get commit-id first.

aws codecommit get-branch --repository-name {name} --branch-name master
{
    "branch": {
        "branchName": "master",
        "commitId": "{use this value}"
    }
}

Create develop and set it as default branch.

aws codecommit create-branch --repository-name {name} --branch-name develop --commit-id {commitId}
aws codecommit update-default-branch --repository-name {name} --default-branch-name develop

S3

sync with content-type.