diff --git a/lambdas/indexer/.chalice/config.json.template.py b/lambdas/indexer/.chalice/config.json.template.py index 6751ef223e..dd77ae946b 100644 --- a/lambdas/indexer/.chalice/config.json.template.py +++ b/lambdas/indexer/.chalice/config.json.template.py @@ -25,7 +25,6 @@ "manage_iam_role": False, "iam_role_arn": "${aws_iam_role.%s.arn}" % app_name, "environment_variables": config.lambda_env, - "minimum_compression_size": config.minimum_compression_size, "lambda_timeout": config.api_gateway_lambda_timeout, "lambda_memory_size": 128, **chalice.vpc_lambda_config(app_name), diff --git a/lambdas/indexer/openapi.json b/lambdas/indexer/openapi.json index 7cc35b914b..cd155a05a8 100644 --- a/lambdas/indexer/openapi.json +++ b/lambdas/indexer/openapi.json @@ -5,6 +5,7 @@ "description": "\nThis is the internal API for Azul's indexer component.\n", "version": "1.0" }, + "x-amazon-apigateway-minimum-compression-size": 1024, "paths": { "/openapi": { "get": { diff --git a/lambdas/service/.chalice/config.json.template.py b/lambdas/service/.chalice/config.json.template.py index 46747fb3d4..c40dff9442 100644 --- a/lambdas/service/.chalice/config.json.template.py +++ b/lambdas/service/.chalice/config.json.template.py @@ -25,7 +25,6 @@ "manage_iam_role": False, "iam_role_arn": "${aws_iam_role.%s.arn}" % app_name, "environment_variables": config.lambda_env, - "minimum_compression_size": config.minimum_compression_size, "lambda_timeout": config.api_gateway_lambda_timeout, "lambda_memory_size": 2048, **chalice.vpc_lambda_config(app_name), diff --git a/lambdas/service/openapi.json b/lambdas/service/openapi.json index 5cfd7759f4..173338ff4b 100644 --- a/lambdas/service/openapi.json +++ b/lambdas/service/openapi.json @@ -23,6 +23,7 @@ "description": "\nDescribes various aspects of the Azul service\n" } ], + "x-amazon-apigateway-minimum-compression-size": 1024, "paths": { "/openapi": { "get": { diff --git a/src/azul/chalice.py b/src/azul/chalice.py index f7ad22b12c..5c5575b395 100644 --- a/src/azul/chalice.py +++ b/src/azul/chalice.py @@ -126,6 +126,7 @@ def __init__(self, self.non_interactive_routes: set[tuple[str, str]] = set() if spec is not None: assert 'paths' not in spec, 'The top-level spec must not define paths' + spec['x-amazon-apigateway-minimum-compression-size'] = config.minimum_compression_size self._specs: Optional[MutableJSON] = copy_json(spec) self._specs['paths'] = {} else: diff --git a/src/azul/package.json b/src/azul/package.json new file mode 100644 index 0000000000..396d83135d --- /dev/null +++ b/src/azul/package.json @@ -0,0 +1,10 @@ +{ + "name": "azul", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "private": true +} diff --git a/src/azul/terraform.py b/src/azul/terraform.py index 84b5fffad9..69fe32b49f 100644 --- a/src/azul/terraform.py +++ b/src/azul/terraform.py @@ -791,6 +791,11 @@ def tf_config(self, app_name): del deployment['lifecycle']['create_before_destroy'] assert not deployment['lifecycle'], deployment del deployment['lifecycle'] + # deployment['lifecycle'] = { + # 'replace_triggered_by': [ + # 'aws_api_gateway_rest_api.%s' % app_name + # ] + # } deployment['triggers'] = {'redeployment': deployment.pop('stage_description')} return {