Skip to content

Instantly share code, notes, and snippets.

@rpstreef
Last active May 10, 2020 08:05
Show Gist options
  • Select an option

  • Save rpstreef/2ad584ba9f1ebc15bfb281b805fb647f to your computer and use it in GitHub Desktop.

Select an option

Save rpstreef/2ad584ba9f1ebc15bfb281b805fb647f to your computer and use it in GitHub Desktop.
cloudformation-static-site-codepipeline
# Fetch code from Master branch, execute Lambda function to generate, compress and deploy static site.
CodePipeline:
Type: "AWS::CodePipeline::Pipeline"
Properties:
Name: !Sub "${DomainName}-codepipeline"
ArtifactStore:
Type: S3
Location: !Ref ExistingCodePipelineBucket
RestartExecutionOnUpdate: false
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${CodePipelineRole}"
Stages:
- Name: Source
Actions:
- Name: SourceAction
ActionTypeId:
Category: Source
Owner: AWS
Provider: CodeCommit
Version: 1
Configuration:
RepositoryName: !Ref ExistingGitRepository
BranchName: master
OutputArtifacts:
- Name: SiteSource
RunOrder: 1
- Name: InvokeGenerator
Actions:
- Name: InvokeAction
InputArtifacts:
- Name: SiteSource
ActionTypeId:
Category: Invoke
Owner: AWS
Provider: Lambda
Version: 1
Configuration:
FunctionName: !Ref GeneratorLambdaFunction
OutputArtifacts:
- Name: SiteContent
RunOrder: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment