This creates a aws code pipeline using terraform that is deployed in ECS
- first export aws credentials to environment variables
export AWS_ACCESS_KEY_ID="AXXXXXXX"
export AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXXXXX"
export AWS_DEFAULT_REGION="eu-west-1"
- create ssh keys for login
ssh-keygen -t rsa
- Initialize terraform workspace
terraform init
- deploy pipline
terraform apply
aws ssm get-parameters --names /aws/service/ecs/optimized-ami/amazon-linux-2/recommended
aws configure # fill in credentials
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/lab-repository
git add .
git commit -m "Initial Commit"
git push origin master
terraform workspace list
terraform workspace create