Skip to content

Invalid entrypoint on AWS Lambda #14

Description

@marcustut

Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap] Runtime.InvalidEntrypoint

I'm having this issue after uploading the .zip file that was successfully built by CodeBuild. FYI, I'm using a subdirectory to house my code. So, in CodeBuild I configured the path to be trading-api/buildspec.yml. And in the yml file I have to make few changes so that the build pass.

Following lines with <-- shows the changed lines

version: 0.2env:
variables:
PATH: "/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/codebuild/user/bin"phases:
install:
commands:
# Install rust toolchanin
- curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimalbuild:
commands:
# move into code directory
- cd trading-api # <---# build Rust binary
- cargo build --release# binary name must be "bootstrap" for Lambda custom runtime
- mv target/release/trading-api bootstrap# strip & check size, dependencies
- strip --strip-all bootstrap
- size bootstrap
- ldd bootstrapartifacts:
files:
- trading-api/bootstrap # <---# - add other resources such as CSS, Javascript assets, etc.#discard-paths: yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions