Issue with ECS Fargate Container Not Reflecting Latest Changes Post Recreation

0

Hello all,

I hope you're all doing well. I'm currently grappling with an unexpected issue in my AWS environment, and I'm reaching out to seek your valuable insights.

Here's the scenario: I have a CodeBuild project set up to generate Docker images, which are then pushed to an ECR registry. Following this, my ECS Fargate container is recreated, and the latest version is deployed. The puzzling part is that, despite this seemingly routine process, the changes in my application are not visible after the container recreation.

What makes this even more perplexing is that this deployment process has been working flawlessly before, and I haven't made any changes to the CodeBuild buildspec file or the deployment procedure. I'm struggling to understand why the latest application changes are not reflected in the newly created ECS Fargate container.

Has anyone else experienced a similar issue? What steps should I take to troubleshoot and identify the root cause of this discrepancy? Could there be any specific areas I should focus on or configurations I might have overlooked?

I appreciate any insights or advice you can provide to help me resolve this issue and ensure that my deployments continue to reflect the latest changes in the application.

Thank you for your time and expertise!

Best regards,

nmos
已提問 5 個月前檢視次數 517 次
2 個答案
0

You will need to check all the following to find the root cause.

Please check the expected version/build of the container has been published to the ECR.

Make sure a new task definition version was created pointing to the expected container tag/sha256

Ensure the ECS service is using the correct task def version.

Make sure that there’s no deployment failures on the service. If there’s an issue with spinning up the new container it will keep failing and retrying while still running an old version of your application.

Check the events on the service to make sure it’s actually trying to deploy a new image.

Upon a stable state, the old versions will not be stopped.

profile picture
專家
已回答 5 個月前
profile pictureAWS
專家
已審閱 5 個月前
  • Hello,

    Thanks for the answer.

    I already check that, everything looks fine and the latest version of the docker image has been deployed but still the changes are not visible in the app.

  • Perhaps there’s a build issue or your changes haven’t been merged into the correct branch? Not sure what else to suggest from here. Could it be an issue with your changes in your app not working as expected?

0

Hi,

did you try the CLI command aws ecs update-service to see if it helps?

It is documented at https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/update-service.html

Best,

Didier

profile pictureAWS
專家
已回答 5 個月前
  • Hello,

    Thanks for the answer.

    This command is the last step in my pipeline, but still the he changes are not visible in the application.

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

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

回答問題指南