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.

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:

$ 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

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.

First, you should enable “Rosetta” on your preferred terminal. This way you’ll be installing packages for x86_64 platform.

Rosetta

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.

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
 ...