LoginSignup
0
0

More than 5 years have passed since last update.

AWS CodePipeline を CloudFormation で構築するときのメモ

Posted at

ソースステージ

Source ステージで S3 を利用する

   - Name: 'Source'
     Actions:
       - Name: 'App'
         ActionTypeId:
           Category: 'Source'
           Owner: 'AWS'
           Version: '1'
           Provider: 'S3'
         Configuration:
           S3Bucket:
             Ref: 'SourceBucket'
           S3ObjectKey: 'source.zip'
         OutputArtifacts:
           - Name: 'App'
         RunOrder: '1'

利用する S3 バケットはバージョニングが Enabled になっていることと、 CodePipeline で利用する Role に該当バケットへのアクセス権が付与されている必要がある。

承認ステージ

Approval ステージで AWS SNS 経由で通知を送る

 - Name: 'Approval'
   Actions:
     - Name: 'Approval'
       ActionTypeId:
         Category: 'Approval'
         Owner: 'AWS'
         Version: '1'
         Provider: 'Manual'
       Configuration:
         NotificationArn:
           Ref: 'CodepipelineTopic'
         ExternalEntityLink: !Sub 'https://${App}.example.com/'
         CustomData: 'Please review the latest change and approve or reject.'
       RunOrder: '1'

NotificationArn で通知を送る SNS Topic を指定する。もちろん該当の SNS Topic に対するアクセス権が付与されている必要がある。
CustoumData でメッセージや ExternalEntityLink でレビュー用のリンクを付加することもできる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0