Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (69 sloc) 2.17 KB
service:
name: example-app-deploy
provider:
name: aws
region: ap-southeast-2
resources:
Resources:
CodeBuildRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- codebuild.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: ${self:service.name}-build-policy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- logs:*
Resource:
Fn::Join:
- ':'
- - arn:aws:logs
- !Ref AWS::Region
- !Ref AWS::AccountId
- log-group
- /aws/codebuild/example-app-deploy
- '*'
- '*'
- Effect: Allow
Action: s3:PutObject
Resource:
Fn::Join:
- ':'
- - arn:aws:s3
- ''
- ''
- example-app-dev-frontpagewebsitebucket-19jr14sozhbv6/*
- Effect: Allow
Action: cloudfront:CreateInvalidation
Resource:
Fn::Join:
- ':'
- - arn:aws:cloudfront
- ''
- !Ref AWS::AccountId
- distribution/E12MWEG8DY8FNG
CodeBuildProject:
Type: AWS::CodeBuild::Project
Properties:
Name: ${self:service.name}
Description: My website builder
ServiceRole: !Ref CodeBuildRole
Artifacts:
Type: NO_ARTIFACTS
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:2.0
Type: LINUX_CONTAINER
Source:
Location: https://github.com/kkesley/react-s3-blog-example.git
Type: GITHUB
You can’t perform that action at this time.