emit({
    "version": "2.0",
    "app_name": config.
    indexer_name[:-len(suffix)],  # Chalice appends stage name implicitly
    "api_gateway_stage": config.deployment_stage,
    "manage_iam_role": False,
    "iam_role_arn": "${var.role_arn}",
    "environment_variables": config.lambda_env,
    "minimum_compression_size": config.minimum_compression_size,
    "lambda_timeout": config.api_gateway_lambda_timeout,
    "lambda_memory_size": 128,
    "stages": {
        config.deployment_stage: {
            "lambda_functions": {
                indexer.contribute.name: {
                    "reserved_concurrency":
                    config.contribution_concurrency(retry=False),
                    "lambda_memory_size":
                    256,
                    "lambda_timeout":
                    config.contribution_lambda_timeout(retry=False),
                },
                indexer.contribute_retry.name: {
                    "reserved_concurrency":
                    config.contribution_concurrency(retry=True),
                    "lambda_memory_size":
                    4096,  # FIXME https://github.com/DataBiosphere/azul/issues/2902
                    "lambda_timeout":
                    config.contribution_lambda_timeout(retry=True)
                },
                indexer.aggregate.name: {
                    "reserved_concurrency":
                    config.aggregation_concurrency(retry=False),
                    "lambda_memory_size":
                    256,
                    "lambda_timeout":
                    config.aggregation_lambda_timeout(retry=False)
                },
                indexer.aggregate_retry.name: {
                    "reserved_concurrency":
                    config.aggregation_concurrency(retry=True),
                    "lambda_memory_size":
                    6500,
                    "lambda_timeout":
                    config.aggregation_lambda_timeout(retry=True)
                },
                indexer.update_health_cache.name: {
                    "lambda_memory_size": 128,
                    "lambda_timeout": config.health_lambda_timeout
                }
            }
        }
    }
})
示例#2
0
from azul import (
    config, )
from azul.template import (
    emit, )

emit(config.lambda_env_for_outsourcing)
示例#3
0
emit({
    "version": "2.0",
    "app_name": config.
    service_name[:-len(suffix)],  # Chalice appends stage name implicitly
    "api_gateway_stage": config.deployment_stage,
    "manage_iam_role": False,
    "iam_role_arn": "${var.role_arn}",
    "environment_variables": config.lambda_env,
    "lambda_timeout":
    config.api_gateway_timeout + config.api_gateway_timeout_padding,
    "lambda_memory_size": 1024,
    "stages": {
        config.deployment_stage: {
            "lambda_functions": {
                config.manifest_lambda_basename: {
                    "lambda_timeout": config.service_lambda_timeout
                },
                config.cart_item_write_lambda_basename: {
                    "lambda_timeout": config.service_lambda_timeout
                },
                config.cart_export_dss_push_lambda_basename: {
                    "lambda_timeout": config.service_lambda_timeout
                },
                config.service_cache_health_lambda_basename: {
                    "lambda_memory_size": 128,
                    "lambda_timeout": config.health_lambda_timeout
                }
            }
        }
    }
})
示例#4
0
emit({
    "version": "2.0",
    "app_name": config.indexer_name[:-len(suffix)],  # Chalice appends stage name implicitly
    "api_gateway_stage": config.deployment_stage,
    "manage_iam_role": False,
    "iam_role_arn": "${var.role_arn}",
    "environment_variables": config.lambda_env,
    "lambda_timeout": config.api_gateway_timeout + config.api_gateway_timeout_padding,
    "lambda_memory_size": 128,
    "stages": {
        config.deployment_stage: {
            "lambda_functions": {
                # FIXME: Brittle coupling between the string literal below and
                #        the handler function name in app.py
                #        https://github.com/DataBiosphere/azul/issues/1848
                "contribute": {
                    "reserved_concurrency": config.indexer_concurrency,
                    "lambda_memory_size": 256,
                    "lambda_timeout": config.contribution_lambda_timeout,
                },
                "aggregate": {
                    "reserved_concurrency": config.indexer_concurrency,
                    "lambda_memory_size": 256,
                    "lambda_timeout": config.aggregation_lambda_timeout(retry=False)
                },
                "aggregate_retry": {
                    "reserved_concurrency": config.indexer_concurrency,
                    "lambda_memory_size": 3008,
                    "lambda_timeout": config.aggregation_lambda_timeout(retry=True)
                },
                config.indexer_cache_health_lambda_basename: {
                    "lambda_memory_size": 128,
                    "lambda_timeout": config.health_lambda_timeout
                }
            }
        }
    }
})
示例#5
0
def emit_tf(tf_config: Optional[JSON]):
    if tf_config is None:
        return emit(tf_config)
    else:
        return emit(_sanitize_tf(populate_tags(tf_config)))
示例#6
0
from azul import config
from azul.template import emit

emit({
    "version": "2.0",
    "app_name": config.qualified_resource_name("dependencies"),
    "api_gateway_stage": config.deployment_stage,
    "manage_iam_role": False,
    "lambda_memory_size": 128,
})
示例#7
0
def emit_tf(tf_config: Optional[JSON]):
    return emit(tf_config) if tf_config is None else emit(
        _sanitize_tf(tf_config))
suffix = '-' + config.deployment_stage
assert config.service_name.endswith(suffix)

service = load_app_module('service')

emit({
    "version": "2.0",
    "app_name": config.
    service_name[:-len(suffix)],  # Chalice appends stage name implicitly
    "api_gateway_stage": config.deployment_stage,
    "manage_iam_role": False,
    "iam_role_arn": "${var.role_arn}",
    "environment_variables": config.lambda_env,
    "minimum_compression_size": config.minimum_compression_size,
    "lambda_timeout": config.api_gateway_lambda_timeout,
    "lambda_memory_size": 2048,
    "stages": {
        config.deployment_stage: {
            "lambda_functions": {
                service.generate_manifest.name: {
                    "lambda_timeout": config.service_lambda_timeout
                },
                service.update_health_cache.name: {
                    "lambda_memory_size": 128,
                    "lambda_timeout": config.health_lambda_timeout
                }
            }
        }
    }
})