リソースタイプ: AWS::CodePipeline::Pipeline 
ref. AWS::CodePipeline::Pipeline
Type: AWS::CodePipeline::Pipeline
Properties: 
  ArtifactStore: 
    ArtifactStore
  ArtifactStores: 
    - ArtifactStoreMap
  DisableInboundStageTransitions: 
    - StageTransition
  Name: String
  RestartExecutionOnUpdate: Boolean
  RoleArn: String
  Stages: 
    - StageDeclaration
  Tags: 
    - Tag
ActionTypeId の Category は Deploy 、 Provider は CloudFormation で ActionMode はCHANGE_SET_REPLACE の例です。CHANGE_SET_REPLACE は変更セッのみを作成します。
DeployPipeline:
  Type: "AWS::CodePipeline::Pipeline"
  Properties:
    # ...
    Stages:
      # ... - 
      - Name: ChangeSet
        Actions:
          -
            Name: Foo
            # ...
            ActionTypeId:
              Category: Deploy
              Owner: AWS
              Version: '1'
              Provider: CloudFormation
            # ...
            Configuration:
              ActionMode: CHANGE_SET_REPLACE # 変更セットを作成 CHANGE_SET_EXECUTEは実行
              ChangeSetName: FooChangeSet
  ActionTypeId: 
    ActionTypeId
  Configuration: Json
  InputArtifacts: 
    - InputArtifact
  Name: String
  Namespace: String
  OutputArtifacts: 
    - OutputArtifact
  Region: String
  RoleArn: String
  RunOrder: Integer
アクションタイプは、アクションカテゴリとアクションプロバイダタイプの組み合わせで構成されます。
https://docs.aws.amazon.com/ja_jp/codepipeline/latest/userguide/reference-pipeline-structure.html
  Category: String
  Owner: String
  Provider: String
  Version: String
Category A category defines what kind of action can be taken in the stage, and constrains the provider type for the action. Valid categories are limited to one of the values below.
本ページで説明しているユースケースでは Source 、 Deploy 、Approval を使用します。
順序は以下のとおりです。
ActionMode ActionMode: CHANGE_SET_REPLACE 変更セット作成承認ActionMode: CHANGE_SET_EXECUTE 変更セット適用各 Catergory ごとに使用できる Provider は以下を参照してください。
ref. https://docs.aws.amazon.com/ja_jp/codepipeline/latest/userguide/reference-pipeline-structure.html#actions-valid-providers
ステージのアクションで CloudFormation をプロバイダーとして指定する場合は、Configuration プロパティ内で次のプロパティを定義します。
configuration:
  ActionMode: CHANGE_SET_REPLACE
  Capabilities: CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND
  ChangeSetName: pipeline-changeset
  RoleArn: CloudFormation_Role_ARN
  StackName: my-pipeline-stack
  TemplateConfiguration: 'my-pipeline-stack::template-configuration.json'
  TemplatePath: 'my-pipeline-stack::template-export.yml'
ref. AWS CloudFormation 設定プロパティのリファレンス
For example, if you want three actions to run in sequence in a stage, you would give the first action the runOrder value of 1, the second action the runOrder value of 2, and the third the runOrder value of 3. However, if you want the second and third actions to run in parallel, you would give the first action the runOrder value of 1 and both the second and third actions the runOrder value of 2.
前提:CodePipeline の Source はGitHubのブランチ
AWS::CodePipeline::Pipeline を実行 => CodePipeline にパイプラインを作成パイプライン が 更新がリリース されて CodePipeline が実行(変更セット作成 -> 承認 -> デプロイ)パイプライン が 更新がリリース されて CodePipeline 変更セット作成 -> 承認 -> デプロイ)JSON でないと ParameterOverrides property is not valid が発生スタックを削除しても新たに CodePipeline が走って作成されてします。
パイプラインを削除後に同じスタックに対して、aws cloudformation create-change-setを実行した場合は以下エラーが発生する。
The account with id '{{アカウントID}}' does not include a pipeline with the name '{{パイプライン名}}' (Service: AWSCodePipeline; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: {{リクエストID}}; Proxy: null)
2回承認した場合。
ChangeSet [ECS-ServiceChangeset] does not exist (Service: AmazonCloudFormation; Status Code: 404; Error Code: ChangeSetNotFound; Request ID: f567e16c-d9cc-418d-91ea-4d3c486ff27e; Proxy: null)
ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ExecuteChangeSet.html