templates/analytics-main.template.yaml [433:463]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - '   # is going to timeout'
            - '   timer = threading.Timer((context.get_remaining_time_in_millis()'
            - '             / 1000.00) - 0.5, timeout, args=[event, context])'
            - '   timer.start()'
            - '   print((''Received event: %s'' % json.dumps(event)))'
            - '   status = cfnresponse.SUCCESS'
            - '   try:'
            - '       source_bucket = event[''ResourceProperties''][''SourceBucket'']'
            - '       dest_bucket = event[''ResourceProperties''][''DestBucket'']'
            - '       prefix = event[''ResourceProperties''][''Prefix'']'
            - '       objects = event[''ResourceProperties''][''Objects'']'
            - '       if event[''RequestType''] == ''Delete'':'
            - '           delete_objects(dest_bucket, prefix, objects)'
            - '       else:'
            - '           copy_objects(source_bucket, dest_bucket, prefix, objects)'
            - '   except Exception as e:'
            - '       logging.error(''Exception: %s'' % e, exc_info=True)'
            - '       status = cfnresponse.FAILED'
            - '   finally:'
            - '       timer.cancel()'
            - '       cfnresponse.send(event, context, status, {}, None)'
            - ''
  
  CopyZips:
    Type: Custom::CopyZips
    Properties:
      ServiceToken: !GetAtt 'CopyZipsFunction.Arn'
      DestBucket: !Ref 'RegionalArtifactBucket'
      SourceBucket: !Ref 'QSS3BucketName'
      Prefix: !Ref 'QSS3KeyPrefix'
      Objects:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/analytics.template.yaml [308:338]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - '   # is going to timeout'
            - '   timer = threading.Timer((context.get_remaining_time_in_millis()'
            - '             / 1000.00) - 0.5, timeout, args=[event, context])'
            - '   timer.start()'
            - '   print((''Received event: %s'' % json.dumps(event)))'
            - '   status = cfnresponse.SUCCESS'
            - '   try:'
            - '       source_bucket = event[''ResourceProperties''][''SourceBucket'']'
            - '       dest_bucket = event[''ResourceProperties''][''DestBucket'']'
            - '       prefix = event[''ResourceProperties''][''Prefix'']'
            - '       objects = event[''ResourceProperties''][''Objects'']'
            - '       if event[''RequestType''] == ''Delete'':'
            - '           delete_objects(dest_bucket, prefix, objects)'
            - '       else:'
            - '           copy_objects(source_bucket, dest_bucket, prefix, objects)'
            - '   except Exception as e:'
            - '       logging.error(''Exception: %s'' % e, exc_info=True)'
            - '       status = cfnresponse.FAILED'
            - '   finally:'
            - '       timer.cancel()'
            - '       cfnresponse.send(event, context, status, {}, None)'
            - ''
  
  CopyZips:
    Type: Custom::CopyZips
    Properties:
      ServiceToken: !GetAtt 'CopyZipsFunction.Arn'
      DestBucket: !Ref 'RegionalArtifactBucket'
      SourceBucket: !Ref 'QSS3BucketName'
      Prefix: !Ref 'QSS3KeyPrefix'
      Objects:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



