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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则