Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Type: Runtime.InvalidEntrypoint #651

Open
airmonitor opened this issue May 13, 2024 · 5 comments
Open

Error Type: Runtime.InvalidEntrypoint #651

airmonitor opened this issue May 13, 2024 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@airmonitor
Copy link

Hey.
I was using cdk_ecr_deployment==3.0.55
cdk --version 2.141.0 (build 3d1c06e)
python --version Python 3.11.9

and got today the error below

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|   timestamp   |                                                                                 message                                                                                  |
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1715603870772 | INIT_START Runtime Version: provided:al2023.v16 Runtime Version ARN: arn:aws:lambda:eu-west-1::runtime:23a5d01a7738492248748a69e3fa947977e72b360e14497d69131a8ebc052f88  |
| 1715603870772 | INIT_REPORT Init Duration: 0.44 ms Phase: init Status: error Error Type: Runtime.InvalidEntrypoint                                                                       |
| 1715603870789 | INIT_REPORT Init Duration: 0.49 ms Phase: invoke Status: error Error Type: Runtime.InvalidEntrypoint                                                                     |
| 1715603870789 | START RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Version: $LATEST                                                                                                   |
| 1715603870790 | RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Error: fork/exec /var/task/bootstrap: permission denied Runtime.InvalidEntrypoint                                        |
| 1715603870790 | END RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d                                                                                                                      |
| 1715603870790 | REPORT RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Duration: 1.44 ms Billed Duration: 2 ms Memory Size: 512 MB Max Memory Used: 3 MB                                 |
| 1715603927062 | INIT_REPORT Init Duration: 0.96 ms Phase: invoke Status: error Error Type: Runtime.InvalidEntrypoint                                                                     |
| 1715603927062 | START RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Version: $LATEST                                                                                                   |
| 1715603927063 | RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Error: fork/exec /var/task/bootstrap: permission denied Runtime.InvalidEntrypoint                                        |
| 1715603927063 | END RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d                                                                                                                      |
| 1715603927063 | REPORT RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Duration: 2.10 ms Billed Duration: 3 ms Memory Size: 512 MB Max Memory Used: 2 MB                                 |
| 1715603927083 | INIT_START Runtime Version: provided:al2023.v16 Runtime Version ARN: arn:aws:lambda:eu-west-1::runtime:23a5d01a7738492248748a69e3fa947977e72b360e14497d69131a8ebc052f88  |
| 1715603927084 | INIT_REPORT Init Duration: 0.62 ms Phase: init Status: error Error Type: Runtime.InvalidEntrypoint                                                                       |
| 1715604051211 | INIT_REPORT Init Duration: 0.63 ms Phase: invoke Status: error Error Type: Runtime.InvalidEntrypoint                                                                     |
| 1715604051211 | START RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Version: $LATEST                                                                                                   |
| 1715604051212 | RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Error: fork/exec /var/task/bootstrap: permission denied Runtime.InvalidEntrypoint                                        |
| 1715604051212 | END RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d                                                                                                                      |
| 1715604051212 | REPORT RequestId: cb7154cc-7b7e-4d4a-a65b-482f89542a5d Duration: 1.68 ms Billed Duration: 2 ms Memory Size: 512 MB Max Memory Used: 2 MB                                 |
| 1715604051227 | INIT_START Runtime Version: provided:al2023.v16 Runtime Version ARN: arn:aws:lambda:eu-west-1::runtime:23a5d01a7738492248748a69e3fa947977e72b360e14497d69131a8ebc052f88  |
| 1715604051228 | INIT_REPORT Init Duration: 0.41 ms Phase: init Status: error Error Type: Runtime.InvalidEntrypoint                                                                       |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@athewsey
Copy link

athewsey commented Jun 10, 2024

I'm seeing same on 3.0.66 (cdk v2.145.0, Python v3.11.9)...

Closest hint I've found so far is this SO question? It also looks like there are relevant post-merge comments on #424

@athewsey
Copy link

In my case, running with environment variable NO_PREBUILT_LAMBDA=1 seems to avoid this issue - but it's not ideal as:

  1. While this works in AWS CodeBuild, the build fails on my local (Mac) machine
  2. It adds to the CI build time

It seems like maybe the library itself is working fine and it's just the pre-built Lambda bundle that needs to be fixed?

Specifically since the error is /var/task/bootstrap: permission denied, maybe it's something as simple a missing chmod somewhere in the Lambda build routine? 🤷‍♂️

athewsey added a commit to aws-samples/amazon-textract-transformer-pipeline that referenced this issue Jun 10, 2024
Force building the Lambda from scratch as per comments on:
cdklabs/cdk-ecr-deployment#651
@satishpasumarthi
Copy link

I am using v3.0.17 and running into this issue. Looks like this issue is flaky and not consistent.
Did you ever get to know the solution for this?

@salvatoredipietro
Copy link

I am using one of the latest version (3.0.81) and I still see this issue.
Does somebody have found a solution or temporary fix about it?
Thanks

@mrgrain
Copy link
Contributor

mrgrain commented Oct 16, 2024

Are you all using Python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants