I deploy a site using Elastic Beanstalks eb deploy
CLI. The site and the eb deploy
command generally work fine.
However, if it has been over 24 hours since the last eb deploy
call, the deploy will always fail with
% eb deploy env-name
Alert: The platform version that your environment is using isn't recommended. There's a recommended version in the same platform branch.
Creating application version archive "app-xxxx-xxxx".
Uploading: [##################################################] 100% Done...
2023-08-23 21:58:26 INFO Environment update is starting.
2023-08-23 21:58:29 ERROR Failed to check health. Verify the permissions on the environment's service role and try again later. Permissions changes take up to two hours to propagate.
2023-08-23 21:58:29 ERROR Failed to deploy application.
To fix this, I simply have to open the console with eb console env-name
, and then click on "rebuild environment." This takes about 10 minutes, but once it is done, I can go back to using eb deploy
again. The eb deploy
will continue to work fine, but 24 hours later, I will receive that error again and the deploy will fail.
The error message shown does not seem to pertain to me. The permissions for the service role are obviously fine -- I can deploy after rebuilding, many times. There are no permissions changes happening, ever, so there's no propagation.
This has been happening for months now, and it's something I'd love to fix as it slows down development. I've seen others with this issue online but no one has resolved it. I've tried completely rebuilding the environment from scratch (not just clicking on rebuild environment) but it still happens. Does anyone know why this is happening?
Same problem, please upvote