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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.