Skip to content

Documentation: Explain <image entrypoint> #44

Open
@kingram6865

Description

@kingram6865

In the instructions there are some small pieces left out that make documentation difficult to understand.
This is one piece. What is the image entrypoint? I think it is wise not to assume people reading know what that is.

What are the minimum required ingredients to get this tool working?
What script names do I need to create in order to follow along with the instructions?

Activity

multimeric

multimeric commented on Mar 22, 2022

@multimeric

From what I can tell, the <image entrypoint> and <(optional) image command> refer to the original entrypoint and command you specified in your dockerfile when you built the container image. You have to re-specify them when using the rie because it needs to run its own entrypoint first. These are almost always going to be the entrypoint for the Runtime Interface Client for your language of choice.

So for example if you're using Node, you will probably have the following in your dockerfile:

RUN npm install aws-lambda-ric
ENTRYPOINT ["npx", "aws-lambda-ric"]
CMD ["index.handler"]

In that case, you should invoke the rie like this:

docker run -d \
    -v ~/.aws-lambda-rie:/aws-lambda \
    -p 9000:8080 \
    myfunction:latest \
    --entrypoint /aws-lambda/aws-lambda-rie \
    npx aws-lambda-ric \
    index.handler
ghost added
documentationImprovements or additions to documentation
on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @multimeric@kingram6865

        Issue actions

          Documentation: Explain `<image entrypoint>` · Issue #44 · aws/aws-lambda-runtime-interface-emulator