Creating a CloudFormation template for CodePipeline

We will start by creating a file called helloworld-codepipeline-cf- template.py inside EffectiveDevOpsTemplates locally.

We will start the script with our boilerplates:

"""Generating CloudFormation template."""from awacs.aws import (    Allow,    Policy,    Principal,    Statement,)from awacs.sts import AssumeRolefrom troposphere import (    Ref,    GetAtt,    Template,)from troposphere.codepipeline import (    Actions,    ActionTypeId,    ArtifactStore,    InputArtifacts,    OutputArtifacts,    Pipeline,    Stages)from troposphere.iam import Rolefrom troposphere.iam import Policy as IAMPolicyfrom troposphere.s3 import Bucket, VersioningConfigurationt = Template()t.add_description("Effective DevOps in AWS: Helloworld Pipeline") ...

Get Effective DevOps with AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.