sst / ion

SST v3
https://sst.dev
MIT License
2.1k stars 247 forks source link

Python function container build targets wrong architecture #1079

Open mtmeyer opened 4 weeks ago

mtmeyer commented 4 weeks ago

When you run sst deploy from your local machine, Docker seems to build for your local machine rather than the architecture of the target lambda function. I'm running an M1 Macbook and when I deployed the Lambda with sst deploy it resulted in the lambda not being able to be run. When the same code was deployed from a machine with the same architecture as the lambda, the lambda worked as expected.

{
    live: false,
    handler: "someHandler/main.handler",
    runtime: "python3.11",
    python: {
      container: true
    }
}

Maybe an additional flag needs to be passed to docker to ensure its built with the same architecture as the lambda.

toughrogrammer commented 2 weeks ago

it's really critical to deploy python lambda.

mtmeyer commented 2 weeks ago

@toughrogrammer This issue will be resolved with #1082 once the SST guys have had a chance to review