java-app-backend/serverless-pipeline.yaml [327:427]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArtifactStore:
        Location: !Ref Artifacts
        Type: S3
      RoleArn: !GetAtt PipelineRole.Arn
      Stages:
        - Name: Source
          Actions:
            - Name: S3Source
              ActionTypeId:
                Category: Source
                Owner: AWS
                Provider: S3
                Version: "1"
              Configuration:
                S3Bucket: !Ref Artifacts
                S3ObjectKey: backend-source.zip
                PollForSourceChanges: false
              OutputArtifacts:
                - Name: SourceArtifact
        - Name: Build
          Actions:
            - Name: Build
              ActionTypeId:
                Category: Build
                Owner: AWS
                Provider: CodeBuild
                Version: "1"
              Configuration:
                ProjectName: !Ref BuildProject
              InputArtifacts:
                - Name: SourceArtifact
              OutputArtifacts:
                - Name: BuildArtifact
        - Name: Deploy
          Actions:
            - Name: CreateChangeSet
              ActionTypeId:
                Category: Deploy
                Owner: AWS
                Provider: CloudFormation
                Version: '1'
              InputArtifacts:
                - Name: BuildArtifact
              Configuration:
                ActionMode: CHANGE_SET_REPLACE
                Capabilities: CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND
                RoleArn: !GetAtt CloudFormationExecutionRole.Arn
                StackName: !Ref DeployStackName
                TemplatePath: "BuildArtifact::packaged-template.yml"
                ChangeSetName: !Sub a-${DeployStackName}-Deploy
              RunOrder: 1
            - !If
              - NeedsApproval
              - Name: ManualApproval
                ActionTypeId:
                  Category: Approval
                  Owner: AWS
                  Provider: Manual
                  Version: '1'
                RunOrder: 2
              - !Ref AWS::NoValue
            - Name: ExecuteChangeSet
              ActionTypeId:
                Category: Deploy
                Owner: AWS
                Provider: CloudFormation
                Version: '1'
              Configuration:
                ActionMode: CHANGE_SET_EXECUTE
                StackName: !Ref DeployStackName
                ChangeSetName: !Sub a-${DeployStackName}-Deploy
              RunOrder: 3

  CodeBuildPolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: !Sub codebuild-access-${AWS::StackName}
      Roles:
        - !Ref BuildProjectRole
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Action:
              - logs:CreateLogGroup
              - logs:CreateLogStream
              - logs:PutLogEvents
            Effect: Allow
            Resource:
              - !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/*
          - Action:
              - s3:PutObject
              - s3:GetObject
              - s3:GetObjectVersion
            Effect: Allow
            Resource:
              - !Sub arn:${AWS::Partition}:s3:::${Artifacts}/*
          - Action:
              - s3:ListBucket
            Effect: Allow
            Resource:
              - !Sub arn:${AWS::Partition}:s3:::${Artifacts}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



python-app-backend/serverless-pipeline.yaml [327:427]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArtifactStore:
        Location: !Ref Artifacts
        Type: S3
      RoleArn: !GetAtt PipelineRole.Arn
      Stages:
        - Name: Source
          Actions:
            - Name: S3Source
              ActionTypeId:
                Category: Source
                Owner: AWS
                Provider: S3
                Version: "1"
              Configuration:
                S3Bucket: !Ref Artifacts
                S3ObjectKey: backend-source.zip
                PollForSourceChanges: false
              OutputArtifacts:
                - Name: SourceArtifact
        - Name: Build
          Actions:
            - Name: Build
              ActionTypeId:
                Category: Build
                Owner: AWS
                Provider: CodeBuild
                Version: "1"
              Configuration:
                ProjectName: !Ref BuildProject
              InputArtifacts:
                - Name: SourceArtifact
              OutputArtifacts:
                - Name: BuildArtifact
        - Name: Deploy
          Actions:
            - Name: CreateChangeSet
              ActionTypeId:
                Category: Deploy
                Owner: AWS
                Provider: CloudFormation
                Version: '1'
              InputArtifacts:
                - Name: BuildArtifact
              Configuration:
                ActionMode: CHANGE_SET_REPLACE
                Capabilities: CAPABILITY_IAM,CAPABILITY_AUTO_EXPAND
                RoleArn: !GetAtt CloudFormationExecutionRole.Arn
                StackName: !Ref DeployStackName
                TemplatePath: "BuildArtifact::packaged-template.yml"
                ChangeSetName: !Sub a-${DeployStackName}-Deploy
              RunOrder: 1
            - !If
              - NeedsApproval
              - Name: ManualApproval
                ActionTypeId:
                  Category: Approval
                  Owner: AWS
                  Provider: Manual
                  Version: '1'
                RunOrder: 2
              - !Ref AWS::NoValue
            - Name: ExecuteChangeSet
              ActionTypeId:
                Category: Deploy
                Owner: AWS
                Provider: CloudFormation
                Version: '1'
              Configuration:
                ActionMode: CHANGE_SET_EXECUTE
                StackName: !Ref DeployStackName
                ChangeSetName: !Sub a-${DeployStackName}-Deploy
              RunOrder: 3

  CodeBuildPolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: !Sub codebuild-access-${AWS::StackName}
      Roles:
        - !Ref BuildProjectRole
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Action:
              - logs:CreateLogGroup
              - logs:CreateLogStream
              - logs:PutLogEvents
            Effect: Allow
            Resource:
              - !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/*
          - Action:
              - s3:PutObject
              - s3:GetObject
              - s3:GetObjectVersion
            Effect: Allow
            Resource:
              - !Sub arn:${AWS::Partition}:s3:::${Artifacts}/*
          - Action:
              - s3:ListBucket
            Effect: Allow
            Resource:
              - !Sub arn:${AWS::Partition}:s3:::${Artifacts}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



