def sync_and_deploy_gateway(collector):
    """Do a sync followed by deploying the gateway"""
    configuration = collector.configuration
    aws_syncr = configuration['aws_syncr']
    find_gateway(aws_syncr, configuration)

    artifact = aws_syncr.artifact
    aws_syncr.artifact = ""
    sync(collector)

    aws_syncr.artifact = artifact
    deploy_gateway(collector)
Do a sync followed by deploying the gateway