Skip to content

infra: CDK wire canônico (DynamoDB + Lambda + HttpApi) — ADR-001 PR2 - #5

Merged
patote85 merged 1 commit into
mainfrom
infra/cdk-wire-canonical
Sep 20, 2026
Merged

patote85 merged 1 commit into
mainfrom
infra/cdk-wire-canonical

Conversation

@patote85

Copy link
Copy Markdown
Owner

Summary

ADR-001 PR2 — traz/completa o stack CDK no canônico e wire tabela → Lambda.

  • Stack única: DynamoDB + Lambda + HTTP API (sem from_function_name)
  • grant_read_write_data + env TABLE_NAME / PIX_FEE
  • Throttle HTTP API: 100 rps / burst 200 (espelha aws-api-gateway-cdk)
  • Rotas: solicitar / status / confirmar / health
  • Sem Cognito (PR3)
  • README só aditivo (seção CDK/Deploy)
  • Não toca em aws-api-gateway-cdk

Handler

app.lambda_handler — código em lambda/ (lambda/app.py → def lambda_handler).

Gaps de propósito (fora deste PR)

  • Empacote/layer Powertools (asset = source only)
  • Cognito JWT (PR3)
  • Arquivar repo irmão CDK

Test plan

  • pip install -r cdk/requirements.txt && npx aws-cdk@2 synth (sem apply)
  • Revisar diff: só wiring CDK + README aditivo + .gitignore mínimo
  • CI pytest existente continua verde

Do not merge without CAB.

Single stack in cdk/: create table and Lambda together (no from_function_name),
grant_read_write_data, TABLE_NAME/PIX_FEE env, HttpApi throttle 100/200.
No Cognito (PR3). README section additive only.

Do not merge without CAB.
@patote85
patote85 merged commit 4fbde97 into main Sep 20, 2026
1 check passed
patote85 added a commit that referenced this pull request Sep 24, 2026
- Enable ruff flake8-datetimez (DTZ) in pyproject
- Replace utcnow with datetime.now(timezone.utc) in lambda/
- README: hard constraints note (DTZ + no CORS *)
patote85 added a commit that referenced this pull request Sep 24, 2026
* agent-friendly #5: ban datetime.utcnow (ruff DTZ)

- Enable ruff flake8-datetimez (DTZ) in pyproject
- Replace utcnow with datetime.now(timezone.utc) in lambda/
- README: hard constraints note (DTZ + no CORS *)

* agent-friendly #5: fix app.py utcnow + README hard constraints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant