cannot unset StartCommand in AppRunner

0

So I recently deployed some apprunner services, and we were experimenting with different configurations... one of which included specifying the StartCommand in AppRunner's image configuration.

Since then we've decided to instead specify the entrypoint directly in the Dockerfile, and would like to remove AppRunner's StartCommand. However attempts to do this in the aws console, via boto, and via terraform have all failed. the request goes through, but nothing happens and the start command remains set to the undesired value. I was able to set it to a single space, but I'd really prefer it to be cleared completely... null or empty string or whatever it is when it's not set.

質問済み 2ヶ月前174ビュー
1回答
0

if you're struggling to unset the StartCommand in AWS AppRunner, and have already tried updating this through the AWS console, boto3, and Terraform without success, you're facing a common challenge. Unfortunately, the AWS documentation and user experiences indicate that once a StartCommand is set in AppRunner, it cannot be directly unset to null through conventional update methods.

A workaround to this issue is to set the StartCommand to a single space, as you have done, which you've noted is not ideal. This method is commonly used as a temporary fix, but it doesn't revert the command to the Dockerfile's CMD instruction.

Currently, there isn't a direct method to completely remove the StartCommand so that AppRunner defaults back to using the Dockerfile's ENTRYPOINT or CMD. This behavior appears to be a limitation within the AppRunner service.

  1. Create a new AppRunner service configuration without specifying the StartCommand.
  2. Migrate your service to the new configuration and ensure it runs as expected.
  3. Delete the old service configuration once the new one is operational.

While these steps involve more work compared to directly editing an existing service, they will ensure that the StartCommand is effectively unset.

profile picture
エキスパート
回答済み 2ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ