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 個月前檢視次數 173 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南