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:

  1. $ docker pull localstack/localstack

You can check the architecture of the pulled image by using docker inspect:

  1. $ docker inspect localstack/localstack | jq '.[0].Architecture'
  2. "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.

  1. $ docker run --privileged --rm tonistiigi/binfmt --install amd64

You can check the current status with:

  1. $ docker run --privileged --rm tonistiigi/binfmt
  2. {
  3. "supported": [
  4. "linux/amd64",
  5. "linux/arm64",
  6. "linux/386"
  7. ],
  8. "emulators": [
  9. "jar",
  10. "llvm-12-runtime.binfmt",
  11. "python3.10",
  12. "python3.9",
  13. "qemu-aarch64"
  14. ]
  15. }

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:

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

Rosetta

What we will be doing now is installing Java and Python executables using Homebrew, it should automatically resolve packages to proper architecture versions.

  1. # Install Homebrew
  2. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. # Install java11 and follow instructions
  4. brew install java11
  5. # Install jenv and follow instructions
  6. brew install jenv
  7. # Add Java11 to jenv and use it globally
  8. jenv add /Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home/
  9. jenv global 11
  10. # Install pyenv and follow instructions
  11. brew install pyenv
  12. # Install python 3.8.10 and enable it globally
  13. pyenv install 3.8.10
  14. 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:

  1. $ docker info
  2. Client:
  3. ...
  4. Server:
  5. ...
  6. Operating System: Ubuntu 20.04
  7. OSType: linux
  8. Architecture: aarch64
  9. ...

Last modified June 1, 2022: Update command to check architecture (#169) (72a33b6e)