procurement-ingest/lambdas/po/email_processor
Adam Moussa 3151de92af
Migrate PO processor to Bedrock
Switch the PO email processor's AI extraction from the Anthropic SDK to
bedrock-runtime InvokeModel on the inference profile
us.anthropic.claude-haiku-4-5-20251001-v1:0 (BEDROCK_MODEL_ID env), so
it no longer needs a provider API key or Secrets Manager secret. PO
parsing stays fully AI -- only the provider changes. The EXTRACTION_PROMPT
is kept byte-identical and the Bedrock text output is still decoded with
json.loads(..., parse_float=Decimal), which DynamoDB requires (it rejects
floats). Replace the deprecated datetime.utcnow() with
datetime.now(timezone.utc) and drop the anthropic dependency.
2026-07-15 20:10:14 -04:00
..
handler.py Migrate PO processor to Bedrock 2026-07-15 20:10:14 -04:00
requirements.txt Migrate PO processor to Bedrock 2026-07-15 20:10:14 -04:00