Hi,
I am trying to start a lambda which is being invoked by an SQS message. The lambda is build with the following command within the init and is based on Go
awslocal --region=us-east-1 --endpoint-url=http://localhost:4566 lambda create-function --function-name deployments-lambda-sandbox-serverless --runtime go1.x --role arn:aws:iam::000000000000:role/deployments-lambda-sandbox-serverless-role --handler main --architectures arm64 --zip-file fileb:///opt/code/localstack/lambdas/deployments-lambda-sandbox-serverless.zip
This creates all fine with the Go binary in a zip file.
However when invoked i get the following error and I am wondering what I have done wrong since I thought arm64 support was added some time ago?
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.43/containers/create?name=generated-localdev-localstack-1-lambda-deployments-lambda-sandbox-serverless-251359e27f1bfa609ce73fafed9142cd&platform=linux%2Farm64: Not Found ("image with reference public.ecr.aws/lambda/go:1 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64")
localstack-1 |
localstack-1 | During handling of the above exception, another exception occurred:
localstack-1 |
localstack-1 | Traceback (most recent call last):
I am running a macbook pro m2 for reference.
my docker compose snippet for localstack:
services:
localstack:
image: localstack/localstack
ports:
- "4566-4597:4566-4597"
environment:
- SERVICES=sqs,sns,lambda,cloudwatch,logs,kms,ses
- DEBUG=0
- PROVIDER_OVERRIDE_LAMBDA=v2
- DATA_DIR=/tmp/localstack/data
volumes:
- ./localstack-init.sh:/etc/localstack/init/ready.d/init-aws.sh
- ./lambdas:/opt/code/localstack/lambdas
- ./volume:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- localstack
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
privileged: true
Thank you,
Alex