Build:
docker build -t health-metrics .
Run:
docker run -p 9000:8080 health-metrics
Test:
curl -X POST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
Setting Env vars in the dockerfile:
ENV MY_VARIABLE=value
Authenticate:
aws ecr get-login-password --region your-region | docker login --username AWS --password-stdin your-account-id.dkr.ecr.your-region.amazonaws.com
Tag:
docker tag my-lambda-function:latest your-account-id.dkr.ecr.your-region.amazonaws.com/my-lambda-function:latest
Push:
docker push your-account-id.dkr.ecr.your-region.amazonaws.com/my-lambda-function:latest