0

I deployed a simple python lambda based on the python 3.8 docker image (amazon/aws-lambda-python:3.8)

I can successfully invoke it locally by using curl, like this (returns a 200OK and valid results):

curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"Hi": "abc"}'

That's great, but to minimise differences between environments, I'd like to be able to call it from Java code using the same name as it would have in production. The URL above refers to the function as function.

Is there a way to bake the function name into the lambda docker image?

pnadeau
  • 427
  • 5
  • 8

1 Answers1

0

The url used for local testing is how the interal AWS components would communicate. eg: if you are using API gateway enable API gateway logs and you would notice this url in logs when API gateway invokes the lambda

When deployed in AWS you can call this function in the same way you call any non containerized lambda function.

Sab
  • 485
  • 5
  • 17