AppConfig image for ECS with arm64 Architecture

0

I am running and ECS Cluster with a Fargate Task that I'd like to run on Graviton processors. In order to do so, I need to update our task definition architecture to arm64. While that works just fine, we also use AWS AppConfig side car container to integrate with AWS AppConfig.

Unfortunately there doesn't seem to be an image available that supports arm64 in ECR. https://gallery.ecr.aws/aws-appconfig/aws-appconfig-agent

Could anyone give me some guidance on how I could build an image that is arm64 compatible? I can't seem to find the Dockerfile this image is based on anywhere on GitHub.

2 Answers
0

I also searched GitHub and Dockerfile but could not find it.
I thought it was possible that the AWS official may not have provided instructions on how to build it.

One way to do it, but what about running only AppConfig container tasks on an x86 basis?
I think it is possible to run it by setting "cpuArchitecture" to x86 in the AppConfig task definition.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform

The only other option would be to wait until ARM64-based support is available.

profile picture
EXPERT
answered a year ago
  • That sets the entire task def OS and Architecture. Therefore the container running the AppConfig side-car would also need to have an arm64 supported image.

0

From AWS Support:

Thanks for contacting AWS premium support. I am from the Config team and I will be assisting you with your case today. From the case correspondence I understand that you are seeking guidance for AppConfig Image for ECS compatibility to arm64 architecture. Please correct me, if I have misunderstood the issue.

Based on the information available, I can advise you that currently there's no existing arm64- compatible image available in ECR which supports AWS AppConfig sidecar container.

Available Workaround:

You can create multi-arch Docker [1] image that supports both x86 and arm64 architectures for the AWS AppConfig sidecar container in your ECS Cluster with arm64 architecture by following the below six steps

Step 1. Creating Multi - arch Docker image : You are able to create multi- arch Docker image which supports both x86 and arm64 architectures, this allows you to use same Docker image across different architecture types. For detailed steps, please refer to the following aws documentation [2]

Step 2. Building image for arm64 : In this step, you can start creating a Docker-file for the AppConfig sidecar container and use the base image which supports arm64 architecture, you can adjust the Docker-file depending on the specific requirement of the AWS AppConfig sidecar container. Please refer to AppConfig document [3] for further reference.

Step 3. Creating Multi - arch image: For building multi - arch Docker image, you can leverage build tools like AWS Copilot or Docker Buildx [4]. These tools support building images for multiple architectures simultaneously [5]

Command for building Docker image, which will help build the Docker image for arm64 architecture -> docker buildx build --platform linux/arm64 -t <image - name> : <tag>

Step 4. Pushing the Image to ECR : Once the multi - arch Docker image is successfully built, you can push it to ECR.

Step 5. Task definition [6] Update the task definition of your ECS cluster to use the multi- arch docker image, you just pushed to ECR and specify the image URI from EC.

Step 6. Deployment: In the final step, deploy the updated task definition to your ECR cluster and it will use multi- arch image, ECS will pull the appropriate architecture image based on the specified architecture

By following the above steps, you would be able to create multi- arch Docker image which supports arm64 architecture for the AWS AppConfig sidecar container in your ECS cluster.

Please note that, I have limited expertise in ECS , as I am from Config team and provided the recommendation on the best effort basis, if you have any other related queries to ECS please reach out to ECS team.

I hope the information is useful to you and apologise for any inconvenience it may have cause you. Please free to contact me, if you have any further queries related to Config. I will be more than happy to help you.

Have a great day and stay safe!

References :

  1. https://docs.docker.com/build/building/multi-platform/
  2. https://aws.amazon.com/blogs/containers/introducing-multi-architecture-container-images-for-amazon-ecr/
  3. https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html
  4. https://docs.docker.com/engine/reference/commandline/buildx_imagetools_inspect/
  5. https://aws.github.io/copilot-cli/
  6. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform

Will come back and post answer once complete.

answered 10 months ago
  • This did not work. The binary in the x86 image is not compatible. I was able to pull the binary from the arm64 app config lambda layer, copy that into the appconfig ecs side car (replacing the existing x86 binary), and the ECS task ran successfully.

    Disappointing that I have to "hack" and build my own side car image (would probably take the AppConfig team to 1hr to publish an arm64 compatible image).

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions