Last active
September 4, 2020 15:20
-
-
Save wmakeev/4c7a890cf08b23389ef92e459cec721c to your computer and use it in GitHub Desktop.
[AWS CI] #aws #sam #codepipeline #ci #typescript #git
Based on Building a continuous delivery pipeline for a Lambda application with AWS CodePipeline.
ssh git-codecommit.eu-west-1.amazonaws.com
Get repository ssh url
ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/my-repo
git remote add origin ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/my-repo
git push
or
git remote add codecommit ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/my-repo
git push codecommit master
aws s3 mb s3://my-repo-lambda-deployment-artifacts
Create an AWS CloudFormation role
Create a role that gives AWS CloudFormation permission to access AWS resources.
-
Open the roles page in the IAM console.
-
Choose Create role.
-
Create a role with the following properties.
- Trusted entity – AWS CloudFormation
- Permissions – AWSLambdaExecute
- Role name –
cfn-lambda-pipeline
-
Open the role. Under the Permissions tab, choose Add inline policy.
-
In Create Policy, choose the JSON tab and add the following policy.
{
"Statement": [
{
"Action": [
"apigateway:*",
"codedeploy:*",
"lambda:*",
"cloudformation:CreateChangeSet",
"iam:GetRole",
"iam:CreateRole",
"iam:DeleteRole",
"iam:PutRolePolicy",
"iam:AttachRolePolicy",
"iam:DeleteRolePolicy",
"iam:DetachRolePolicy",
"iam:PassRole",
"s3:GetObject",
"s3:GetObjectVersion",
"s3:GetBucketVersioning"
],
"Resource": "*",
"Effect": "Allow"
}
],
"Version": "2012-10-17"
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment