By using AWS re:Post, you agree to the Terms of Use
/How do I get console access to a container from ECR launched on App Runner?/

How do I get console access to a container from ECR launched on App Runner?


And if this is not possible, how do I run basic commands like php artisan config:cache or other commands that aren't possible in the build for a variety of reasons (such as limitations in docker, etc)?

asked 23 days ago25 views
1 Answers

As of now, using App Runner you don't have access to the running container.

You should run those commands as part of your docker file, or consider other container orchestration platforms.

answered 23 days ago
  • As noted, this is not always possible because of limitations within Docker, not to mention the headaches that zero access presents when trying to do meaningful debugging. Heroku has a shell feature, why would anyone use App Runner when it is lacking this really basic capability?

  • Generally speaking if you need shell access to do debugging, it's not a good sign. There are other observability options in App Runner such as x-ray. Also it's always the case that you lose some flexibility to get less management overhead. Like I noted, if you need more flexibility such as shell access, choose another container orchestration platform. App Runner offers good amount of value for many usecases, but not for every usecase.

  • Well, it's certainly not a good sign for App Runner. If it worked, there wouldn't be any need for this - but it very often does not, in ways that are not observable through any of the mechanisms that are provided (including x-ray). Suggesting we just switch is a fairly naive idea that utterly ignores the delays, costs, and risks involved (not to mention sunk costs), and makes me wonder how much experience you actually have with deploying production-scale images to App Runner or anywhere else (and why you're weighing in, considering this).

  • Like I said, generally in any CSP you always trade flexibility for easy of use. App Runner is capable of running some production workload and can scale well in many cases. That does not mean it's for every use case. If shell access is something you have to have, then clearly App Runner is not for you (as of now). For example, ECS has been running large scale production applications for a long time, and yet similar capabilities (ECS Exec) was only added last year.

  • Your question specifically asked is whether App Runner supports shell access, and I provided you answer. As matter of fact, many production grade deployment of containers limit shell access, it's an exception rather than the norm. You should be focusing on finding ways to run the init commands within the container image itself, or if there are any limitation you see, state as such. It's not the case that you have to shell into each container to start your application. that's not how containers should scale.

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