templates/lab_template-old.yml [723:784]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  - "iam:AttachRolePolicy"
                  - "iam:DetachRolePolicy"
                  - "iam:PutRolePolicy"
                  - "iam:DeleteRolePolicy"
                  - "iam:GetRolePolicy"
                  - "iam:CreatePolicy"
                  - "iam:DeletePolicy"
                  - "iam:CreateRole"
                  - "iam:DeleteRole"
                  - "iam:ListPolicies"
                  - "iam:ListRoles"
                  - "iam:PassRole"
                Resource: "*"
      Tags:
        - Key: Name
          Value: !If [ condEventEngine, !Sub "auroralab-ide-${AWS::Region}", !Sub "${AWS::StackName}-ide-${AWS::Region}" ]
  profileClientIDE:
    Type: "AWS::IAM::InstanceProfile"
    Properties:
      InstanceProfileName: !If [ condEventEngine, !Sub "auroralab-ide-${AWS::Region}", !Sub "${AWS::StackName}-ide-${AWS::Region}" ]
      Path: /
      Roles:
        - Ref: roleClientIDE

## Create a Cloud9 IDE host
  c9ClientIDE:
    Type: AWS::Cloud9::EnvironmentEC2
    DependsOn: [ resLabAccount ]
    Properties: 
      AutomaticStopTimeMinutes: 120
      ConnectionType: CONNECT_SSM
      Description: "Cloud9 IDE to interact with the Aurora DB resources"
      InstanceType: !FindInMap [ RegionalSettings, !Ref "AWS::Region", ideType ]
      ImageId: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
      Name: !If [ condEventEngine, "auroralab-client-ide", !Sub "${AWS::StackName}-client-ide" ]
      SubnetId: !Ref sub1Private
      OwnerArn: !If [ condEventEngine, !Sub "arn:aws:iam::${AWS::AccountId}:assumed-role/TeamRole/MasterKey", Ref: AWS::NoValue ]
      Tags:
        - Key: BootstrapGroup
          Value: !Sub "bootstrap-${AWS::StackName}"

## Create a Cloud9 host SSM bootstrap document
  ssmDocClientBootstrap: 
    Type: AWS::SSM::Document
    DependsOn: [ bootstrapWaitHandle ]
    Properties:
      DocumentType: Command
      Name: !If [ condEventEngine, "auroralab-bootstrap-client", !Sub "${AWS::StackName}-bootstrap-client" ]
      Tags:
        - Key: Name
          Value: !If [ condEventEngine, "auroralab-bootstrap-client", !Sub "${AWS::StackName}-bootstrap-client" ]
      Content:
        schemaVersion: '2.2'
        description: "Bootstrap Cloud9 Client IDE Instance"
        mainSteps:
        - action: aws:runShellScript
          name: BootstrapTools
          inputs:
            runCommand:
            - "#!/bin/bash -xe"
            - "echo \"$(date \"+%F %T\") * running as $(whoami)\" >> /bootstrap.log"
            - "yum install -y unzip jq"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/lab_template.yml [727:788]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  - "iam:AttachRolePolicy"
                  - "iam:DetachRolePolicy"
                  - "iam:PutRolePolicy"
                  - "iam:DeleteRolePolicy"
                  - "iam:GetRolePolicy"
                  - "iam:CreatePolicy"
                  - "iam:DeletePolicy"
                  - "iam:CreateRole"
                  - "iam:DeleteRole"
                  - "iam:ListPolicies"
                  - "iam:ListRoles"
                  - "iam:PassRole"
                Resource: "*"
      Tags:
        - Key: Name
          Value: !If [ condEventEngine, !Sub "auroralab-ide-${AWS::Region}", !Sub "${AWS::StackName}-ide-${AWS::Region}" ]
  profileClientIDE:
    Type: "AWS::IAM::InstanceProfile"
    Properties:
      InstanceProfileName: !If [ condEventEngine, !Sub "auroralab-ide-${AWS::Region}", !Sub "${AWS::StackName}-ide-${AWS::Region}" ]
      Path: /
      Roles:
        - Ref: roleClientIDE

## Create a Cloud9 IDE host
  c9ClientIDE:
    Type: AWS::Cloud9::EnvironmentEC2
    DependsOn: [ resLabAccount ]
    Properties: 
      AutomaticStopTimeMinutes: 120
      ConnectionType: CONNECT_SSM
      Description: "Cloud9 IDE to interact with the Aurora DB resources"
      InstanceType: !FindInMap [ RegionalSettings, !Ref "AWS::Region", ideType ]
      ImageId: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
      Name: !If [ condEventEngine, "auroralab-client-ide", !Sub "${AWS::StackName}-client-ide" ]
      SubnetId: !Ref sub1Private
      OwnerArn: !If [ condEventEngine, !Sub "arn:aws:iam::${AWS::AccountId}:assumed-role/TeamRole/MasterKey", Ref: AWS::NoValue ]
      Tags:
        - Key: BootstrapGroup
          Value: !Sub "bootstrap-${AWS::StackName}"

## Create a Cloud9 host SSM bootstrap document
  ssmDocClientBootstrap: 
    Type: AWS::SSM::Document
    DependsOn: [ bootstrapWaitHandle ]
    Properties:
      DocumentType: Command
      Name: !If [ condEventEngine, "auroralab-bootstrap-client", !Sub "${AWS::StackName}-bootstrap-client" ]
      Tags:
        - Key: Name
          Value: !If [ condEventEngine, "auroralab-bootstrap-client", !Sub "${AWS::StackName}-bootstrap-client" ]
      Content:
        schemaVersion: '2.2'
        description: "Bootstrap Cloud9 Client IDE Instance"
        mainSteps:
        - action: aws:runShellScript
          name: BootstrapTools
          inputs:
            runCommand:
            - "#!/bin/bash -xe"
            - "echo \"$(date \"+%F %T\") * running as $(whoami)\" >> /bootstrap.log"
            - "yum install -y unzip jq"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



