Skip to content

[BUG] App Runner not allowing removal of "Start command" when saving config

0

Enter image description here In AWS app runner, i'm unable to remove the "start command" which is an optional string used to override the docker start command. Despite saving and rebuilding, the string that I had entered and want to remove, isn't being removed. I've had to make an new project, and delete the old one because the data changes aren't persisting on AWS's end.

I'm 99% sure this is a bug but if it's not, please let me know. Thanks!

asked 2 years ago191 views

1 Answer
0

You've encountered a known issue with AWS App Runner regarding the removal of the "Start command" (also known as StartCommand). This is indeed a limitation of the App Runner service that many users have experienced.

When you set a StartCommand for an App Runner service, it becomes difficult to completely remove or unset it through conventional methods. Attempts to clear this field through the AWS console, AWS CLI, SDKs like boto3, or infrastructure-as-code tools like Terraform often fail to persist the changes. The service continues to use the previously set command, even after attempts to remove it.

As a workaround, some users have found that setting the StartCommand to a single space character can help, but this isn't ideal as it doesn't truly revert to using the Dockerfile's CMD or ENTRYPOINT instructions.

The approach you've taken - creating a new project without specifying the StartCommand and then deleting the old one - is currently one of the most effective ways to address this issue. While it's not the most convenient solution, it does ensure that your service runs without the unwanted start command.

For future reference, if you need to change or remove the StartCommand, consider the following steps:

  1. Create a new App Runner service configuration without specifying the StartCommand.
  2. Migrate your application to this new service and verify that it runs as expected.
  3. Once the new service is operational, delete the old service with the problematic StartCommand.

This issue highlights the importance of carefully considering whether to set a custom StartCommand when initially configuring an App Runner service, as it can be challenging to remove later on. It's generally better to rely on the Dockerfile's instructions unless absolutely necessary to override them.
Sources
cannot unset StartCommand in AppRunner | AWS re:Post

answered 2 years ago

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.