resources/templates/pipeline.yaml [265:327]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Type: !Ref EnvironmentType
        EnvironmentVariables:
          - Name: PACKAGE_BUCKET
            Value: !Ref Artifacts

  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}
  BuildProjectRole:
    Type: AWS::IAM::Role
    Properties:
      Description: !Sub "Used in CodeBuild project. Created by stack ${AWS::StackId}"
      AssumeRolePolicyDocument:
        Statement:
          - Action:
              - sts:AssumeRole
            Effect: Allow
            Principal:
              Service:
                - codebuild.amazonaws.com
        Version: '2012-10-17'
      Path: /service-role/

  DeploymentRole:
    Type: AWS::IAM::Role
    Properties:
      Description: !Sub "Used by CloudFormation. Created by stack ${AWS::StackId}"
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - "cloudformation.amazonaws.com"
            Action:
              - "sts:AssumeRole"
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AdministratorAccess
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



workshop/static/assets/chapter6/step1/pipeline.yml [267:330]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Type: !Ref EnvironmentType
        EnvironmentVariables:
          - Name: PACKAGE_BUCKET
            Value: !Ref Artifacts

  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}

  BuildProjectRole:
    Type: AWS::IAM::Role
    Properties:
      Description: !Sub "Used in CodeBuild project. Created by stack ${AWS::StackId}"
      AssumeRolePolicyDocument:
        Statement:
          - Action:
              - sts:AssumeRole
            Effect: Allow
            Principal:
              Service:
                - codebuild.amazonaws.com
        Version: '2012-10-17'
      Path: /service-role/

  DeploymentRole:
    Type: AWS::IAM::Role
    Properties:
      Description: !Sub "Used by CloudFormation. Created by stack ${AWS::StackId}"
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - "cloudformation.amazonaws.com"
            Action:
              - "sts:AssumeRole"
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AdministratorAccess
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



