mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
dev deploys have failed since PR #1231 (2026-06-15) with InvalidParameterValueException: Unzipped size must be smaller than 262144000 bytes. The lambda zip is built from the whole repo root (deployment/terraform/modules/lambda_with_api_gateway) and only excluded tests/deployment/pycache — so .git (206MB packed), the per-schema corpus.jsonl fixtures under backend/epc_api/json_samples/ (~50MB), and the sap10_calculator PDF specs (~13MB) were all being zipped up even though none of them are read at runtime. Also add scripts/check_lambda_zip_size.py, which mirrors the terraform module's pip install + zip-with-excludes behaviour to report the projected unzipped size without mutating the repo, and wire it into deploy_terraform.yml as a fast_api_lambda_zip_size_check job that gates the real deploy so this fails fast with a clear message instead of surfacing as an opaque Terraform/AWS error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
51 lines
No EOL
939 B
HCL
51 lines
No EOL
939 B
HCL
variable "name" { type = string }
|
|
variable "stage" { type = string }
|
|
variable "source_dir" { type = string }
|
|
variable "handler" { type = string }
|
|
variable "runtime" { type = string }
|
|
|
|
variable "zip_excludes" {
|
|
type = list(string)
|
|
default = [
|
|
"**/__pycache__/**",
|
|
"**/*.pyc",
|
|
"**/.pytest_cache/**",
|
|
"**/tests/**",
|
|
"**/deployment/**",
|
|
"**/.git/**",
|
|
"**/json_samples/**",
|
|
"**/docs/specs/**"
|
|
]
|
|
}
|
|
|
|
variable "timeout" {
|
|
type = number
|
|
default = 600
|
|
}
|
|
variable "memory_size" {
|
|
type = number
|
|
default = 512
|
|
}
|
|
variable "environment" {
|
|
type = map(string)
|
|
default = {}
|
|
}
|
|
|
|
variable "domain_name" {
|
|
type = string
|
|
default = null
|
|
}
|
|
variable "certificate_arn" {
|
|
type = string
|
|
default = null
|
|
}
|
|
variable "route53_zone_id" {
|
|
type = string
|
|
default = null
|
|
}
|
|
variable "artifact_bucket" { type = string }
|
|
|
|
variable "requirements_file" {
|
|
type = string
|
|
default = null
|
|
} |