0

I am trying to deploy a maven project Backend Service within my engine using AWS copilot. The maven backend service is failing to deploy with the following error being the most detailed I can find on cloud watch logs:

copilot/export/58577c160d standard_init_linux.go:228: exec user process caused: exec format error

Looking online, I believe this is an architecture issue. I have encountered this problem before and it was fixed by changing a GraphQl image from FROM hasura/graphql-engine:v2.1.1.cli-migrations-v3 to FROM hasura/graphql-engine:v2.0.7 time so I'll play about with images again, would be keen to know you have any more insight into this error as I keep bumping into it on AWS copilot.

The images I am using for service failing to deploy are : FROM maven:3.8.3-openjdk-17-slim AS build FROM openjdk:17-slim

Full issue here: https://jackow98.notion.site/Copilot-failing-to-deploy-def6f6281c794e97b1cb3ae4ece964bd

Any advice on how to fix the error for Maven would be much appreciated!

  • The error is related to an go code which looks like not being built for a particular platform. That looks not related to Maven... – khmarbaise Jan 28 '22 at 13:02

1 Answers1

0

Perhaps you are on an M1 machine?

If so, try adding platform: linux/arm64 to your workload manifest. (See https://aws.github.io/copilot-cli/docs/manifest/backend-service/#platform.)

huanjani
  • 220
  • 1
  • 2
  • Hello, thank you very much for your answer Looking into this further, it definitely is an M1 problem. Can deploy on my windows machine using WSL not problem. I tried adding in `platform: linux/arm64` to the manifest file however I am presented with the following error `validate manifest against environment test: validate ARM: 'Fargate Spot' is not supported when deploying on ARM architecture` – Jack Walker Jan 29 '22 at 14:57
  • Unfortunately, Spot is not yet supported for ARM, but it is in the works! – huanjani Feb 03 '22 at 19:28