nmpAgents/nmpAWSInfraestructure
JOSE ANASTACIO ESQUIVEL SALAS 496ce190ef first commit 2026-11-05 03:48:28 -06:00
..
examples first commit 2026-11-05 03:48:28 -06:00
schemas first commit 2026-11-05 03:48:28 -06:00
src first commit 2026-11-05 03:48:28 -06:00
README.md first commit 2026-11-05 03:48:28 -06:00

README.md

Lambda de infraestructura AWS

src/aws_infrastructure.py implementa lambda_handler y las consultas de EC2 y Lambda mediante boto3. El handler continúa siendo aws_infrastructure.lambda_handler.

Directorios

  • src/: código ejecutable de la Lambda.
  • schemas/ec2-tools.json: contrato de referencia de este componente. El gateway AgentCore consume ../nmpOnboardingAgent/schemas/tools/ec2-tools.json; al cambiar operaciones o parámetros hay que mantener ambos contratos compatibles.
  • examples/: solicitud y respuesta históricas para una invocación manual.
  • artifacts/legacy/: paquete ZIP original, conservado sin modificaciones.

Empaquetar

Desde este directorio, en PowerShell:

New-Item -ItemType Directory -Path artifacts -Force | Out-Null
Compress-Archive -LiteralPath src/aws_infrastructure.py -DestinationPath artifacts/aws-infrastructure.zip -Force

El módulo debe quedar en la raíz del ZIP, sin la carpeta src/. Este comando solo crea el paquete local; no actualiza la Lambda en AWS. El código requiere boto3, disponible en el runtime administrado de Python de Lambda.