templates/fncm-cmis-deploy.yaml [216:247]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Properties:
      Handler: index.lambda_handler
      Runtime: python3.7
      Code:
        ZipFile: !Join
          - |+

          - - import boto3
            - 'import os, time,json'
            - import cfnresponse
            - import logging
            - ''
            - 'def lambda_handler(event, context):'
            - '    print(''Received event: %s'' % json.dumps(event))'
            - '    status = cfnresponse.SUCCESS'
            - '    try:'
            - '        if event[''RequestType''] == ''Delete'':'
            - '            cfnresponse.send(event, context, status, {})'
            - '        else:'
            - '            ssm = boto3.client(''ssm'')'
            - ''
            - '            asg = boto3.client(''autoscaling'')'
            - '            asg_name = event[''ResourceProperties''][''BastionASGName'']'
            - '            responseAsg = asg.describe_auto_scaling_groups(AutoScalingGroupNames=[asg_name])'
            - '            instanceId = responseAsg[''AutoScalingGroups''][0][''Instances''][0][''InstanceId'']'
            - '            ssmDocument = event[''ResourceProperties''][''SSMDocument'']'
            - '            responseData = {}'
            - ''
            - '            response=ssm.send_command('
            - '                InstanceIds = [instanceId],'
            - '                DocumentName=ssmDocument,'
            - '                TimeoutSeconds=3600,'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/fncm-oracle-objects.yaml [227:258]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Properties:
      Handler: index.lambda_handler
      Runtime: python3.7
      Code:
        ZipFile: !Join
          - |+

          - - import boto3
            - 'import os, time,json'
            - import cfnresponse
            - import logging
            - ''
            - 'def lambda_handler(event, context):'
            - '    print(''Received event: %s'' % json.dumps(event))'
            - '    status = cfnresponse.SUCCESS'
            - '    try:'
            - '        if event[''RequestType''] == ''Delete'':'
            - '            cfnresponse.send(event, context, status, {})'
            - '        else:'
            - '            ssm = boto3.client(''ssm'')'
            - ''
            - '            asg = boto3.client(''autoscaling'')'
            - '            asg_name = event[''ResourceProperties''][''BastionASGName'']'
            - '            responseAsg = asg.describe_auto_scaling_groups(AutoScalingGroupNames=[asg_name])'
            - '            instanceId = responseAsg[''AutoScalingGroups''][0][''Instances''][0][''InstanceId'']'
            - '            ssmDocument = event[''ResourceProperties''][''SSMDocument'']'
            - '            responseData = {}'
            - ''
            - '            response=ssm.send_command('
            - '                InstanceIds = [instanceId],'
            - '                DocumentName=ssmDocument,'
            - '                TimeoutSeconds=3600,'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



