ARM64 Support
Describes the support for the ARM64 CPU architecture in LocalStack.
With version 0.13, LocalStack officially publishes a multi-architecture Docker manifest. This manifest contains links to a Linux AMD64 as well as a Linux ARM64 image.
Experimental
The ARM64 image of LocalStack is still experimental. Help us getting aware of current issues with the ARM64 image by filing an issue if you experience any problems.
Currently known limitations are collected in the GitHub issue localstack/localstack#4921.
Pulling the image
With the multi-arch Docker manifest, your Docker client (and therefore the LocalStack CLI) now automatically selects the image according to your platform:
$ docker pull localstack/localstack
You can check the architecture of the pulled image by using docker inspect
:
$ docker inspect localstack/localstack | jq '.[0].Architecture'
"arm64"
Using AMD64 Lambda functions and binaries on ARM64
If you want to execute Docker Lambda functions or binaries which have not been built for your architecture, you need to configure cross-platform emulation on your system.
You can do so by installing a AMD64 bin_fmt
emulator on your ARM64 host system with the following command:
Affects host system
The following command installs additionals emulators on your host system.
$ docker run --privileged --rm tonistiigi/binfmt --install amd64
You can check the current status with:
$ docker run --privileged --rm tonistiigi/binfmt
{
"supported": [
"linux/amd64",
"linux/arm64",
"linux/386"
],
"emulators": [
"jar",
"llvm-12-runtime.binfmt",
"python3.10",
"python3.9",
"qemu-aarch64"
]
}
Troubleshooting
Pulling images for other architectures
Unsupported
Please be aware that this workaround is not supported by LocalStack at all.
If you want to use a LocalStack image which has been built for another architecture than yours, you can instruct Docker to use another platform by setting the DOCKER_DEFAULT_PLATFORM
environment variable:
$ export DOCKER_DEFAULT_PLATFORM=linux/amd64
When using Docker Compose, you can use the platform
element as described in the specification.
Apple Silicon / Apple M1
If you are experiencing issues with the ARM64 image (and after you created an issue to make us aware of the problem 😉), you can try to use the AMD64 packages on your Apple Silicon device and use Apple Rosetta to emulate the AMD64 / x86_64 CPU architecture.
Unsupported
Please be aware that this workaround is not supported by LocalStack at all.
First, you should enable “Rosetta” on your preferred terminal. This way you’ll be installing packages for x86_64
platform.
What we will be doing now is installing Java and Python executables using Homebrew, it should automatically resolve packages to proper architecture versions.
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install java11 and follow instructions
brew install java11
# Install jenv and follow instructions
brew install jenv
# Add Java11 to jenv and use it globally
jenv add /Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home/
jenv global 11
# Install pyenv and follow instructions
brew install pyenv
# Install python 3.8.10 and enable it globally
pyenv install 3.8.10
pyenv global 3.8.10
Then clone LocalStack to your machine, run make install
and then make start
.
Note on JVM Lambda
You need to use the local
lambda executor for JVM Lambda functions.
Raspberry Pi
If you want to run LocalStack on your Raspberry Pi, make sure to use a 64bit operating system. In our experience, it works best on a Raspberry Pi 4 8GB with Ubuntu Server 20.04 64Bit for Raspberry Pi.
You can check if Docker is running and your architecture is ARM64 / aarch64 by using docker info
:
$ docker info
Client:
...
Server:
...
Operating System: Ubuntu 20.04
OSType: linux
Architecture: aarch64
...
Last modified June 1, 2022: Update command to check architecture (#169) (72a33b6e)