better logs

This commit is contained in:
Jun-te Kim 2026-02-03 20:03:25 +00:00
parent 360f06df83
commit 440165dc2d

View file

@ -5,12 +5,6 @@
cp -r lambda/_template lambda/<lambda_name>
- Update `variables.tf` if required
- Ensure the Terraform module accepts:
- `lambda_name`
- `stage`
- `image_uri`
---
### 2. Add infrastructure prerequisites (shared stack)
@ -18,12 +12,10 @@
infrastructure/terraform/shared/main.tf
- Apply the shared stack (or let CI apply it on `prod`)
- Verify the ECR repository exists in AWS
- Apply the shared stack
- This requires commenting 'if env.stage == "prod"' in .github/workflows/deploy_terraform.yml
Note:
No Terraform outputs are required for the ECR repo.
The CI pipeline resolves the repository URL dynamically at build time.
- Verify the ECR repository exists in AWS
---
@ -36,11 +28,6 @@ The CI pipeline resolves the repository URL dynamically at build time.
### 4. Wire the Lambda deploy job (CI)
- Add a deploy job using `_deploy_lambda.yml`
- Pass the following inputs:
- `lambda_name`
- `lambda_path`
- `stage`
- `image_uri` (constructed as `repo@sha256:digest`)
- Ensure the deploy job depends on the image build job
---
@ -49,24 +36,16 @@ The CI pipeline resolves the repository URL dynamically at build time.
- Push changes to GitHub
- CI will:
1. Build and push the Docker image
2. Resolve the image digest
3. Deploy the Lambda using the immutable `image_uri`
2. Deploy the Lambda
3. Verify everything deployed. Good things to check:
- ECR with image
- SQS
- Trigger SQS
- Cloud watch logs
---
### 5. Delete
1. Delete README if you used cp -r
---
## Notes
- Terraform remote state is not used for image wiring
- Image tags are not used; deployments are digest-based
- By default, the template wires SQS → Lambda
To change this, update the Terraform in `lambda/<lambda_name>`
(e.g. EventBridge, API Gateway, direct invoke)
---
## Rule of thumb
CI decides what image to deploy.
Terraform only deploys it.
## Please feel free to update this document to make it easier for the next person