示例#1
0
 if not sns_update_listener:
     sns_update_listener = update_sns
 # set environment
 os.environ['AWS_REGION'] = DEFAULT_REGION
 os.environ['ENV'] = ENV_DEV
 # register signal handlers
 register_signal_handlers()
 # make sure AWS credentials are configured, otherwise boto3 bails on us
 check_aws_credentials()
 # install libs if not present
 install_components(apis)
 # start services
 thread = None
 if 'es' in apis:
     # delete Elasticsearch data that may be cached locally from a previous test run
     aws_stack.delete_all_elasticsearch_data()
     thread = start_elasticsearch(async=True)
 if 's3' in apis:
     thread = start_s3(async=True)
 if 'sns' in apis:
     thread = start_sns(async=True, update_listener=sns_update_listener)
 if 'sqs' in apis:
     thread = start_sqs(async=True)
 if 'apigateway' in apis:
     thread = start_apigateway(async=True, update_listener=apigateway_update_listener)
 if 'dynamodb' in apis:
     thread = start_dynalite(async=True, update_listener=dynamodb_update_listener)
 if 'dynamodbstreams' in apis:
     thread = start_dynamodbstreams(async=True)
 if 'firehose' in apis:
     thread = start_firehose(async=True)
示例#2
0
 if not sns_update_listener:
     sns_update_listener = sns_listener.update_sns
 # set environment
 os.environ['AWS_REGION'] = DEFAULT_REGION
 os.environ['ENV'] = ENV_DEV
 # register signal handlers
 register_signal_handlers()
 # make sure AWS credentials are configured, otherwise boto3 bails on us
 check_aws_credentials()
 # install libs if not present
 install_components(apis)
 # start services
 thread = None
 if 'es' in apis:
     # delete Elasticsearch data that may be cached locally from a previous test run
     aws_stack.delete_all_elasticsearch_data()
     thread = start_elasticsearch(async=True)
 if 's3' in apis:
     thread = start_s3(async=True)
 if 'sns' in apis:
     thread = start_sns(async=True, update_listener=sns_update_listener)
 if 'sqs' in apis:
     thread = start_sqs(async=True)
 if 'apigateway' in apis:
     thread = start_apigateway(async=True, update_listener=apigateway_update_listener)
 if 'dynamodb' in apis:
     thread = start_dynalite(async=True, update_listener=dynamodb_update_listener)
 if 'dynamodbstreams' in apis:
     thread = start_dynamodbstreams(async=True)
 if 'firehose' in apis:
     thread = start_firehose(async=True)