dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.16k stars 794 forks source link

Expired image for lambci/lambda:go1.x #1754

Closed manfioLP closed 2 months ago

manfioLP commented 5 months ago

Bug Report

Current Behavior

When running node ./node_modules/.bin/serverless offline start --config serverless.dev.yml --useDocker --host 0.0.0.0 I'm Getting this:

time="2024-01-31T00:37:34-03:00" level=error msg="Metadata for targets expired"
  time="2024-01-31T00:37:35-03:00" level=error msg="Metadata for targets expired"
  time="2024-01-31T00:37:35-03:00" level=error msg="Metadata for targets expired"
  time="2024-01-31T00:37:36-03:00" level=error msg="Metadata for targets expired"
  Error: remote repository docker.io/lambci/lambda out-of-date: targets expired at Mon Jan 29 16:32:58 -0500 2024
✖ Unhandled exception in handler 'aws'.
✖ { Error: Command failed with exit code 1: docker pull --disable-content-trust=false lambci/lambda:go1.x

Looks like lambci/lambda:go1.x is expired (looking from other Issues seems that python is too ref: #1750 )

Sample Code

Any file with:

service: my-service

plugins:
  - serverless-offline

provider:
  runtime: go1.x
  stage: dev

would do.

Expected behavior/code

To lambda run on container env without throwing expired error

Environment

manfioLP commented 5 months ago

for people coming to this because of expired Docker Image used by serverless-offilne:

serverless-offline is currently using lambci images for Docker which were abandoned a long while ago and haven't been updated in years.

I found this very detailed description detailed description of what needs to be done kudos to @davidjb

seems like this repo is stale and getting deprecated if you're not using nodejs, so for python/golang devs, it will be quite of a pain to develop locally since it simply doesn't run :(

I'm considering the move to SAM

Kirynn commented 5 months ago

This is also a problem for java devs 😢

DorianMazur commented 2 months ago

@manfioLP @Kirynn This should now be fixed. I just merged a PR that solves this issue - #1755