ECS Fargate task stop with a message on the web console: Your Spot Task was interrupted.

0

Hello developers,

I had initiated a SPOT ECS Fargate task which stopped after running sometime with a message (JS Code is written in node:14-alpine): "Your Spot Task was interrupted."

Task Docker Container: FROM node:14-alpine Code: NodeJS

However, my process.on code didn't fire-up:

process.on('SIGTERM', async () => { console.log("The service is about to shut down!"); process.exit(0); });

Any clue why code didn't capture the "SIGTERM" event?

FYI: I know there is a way to capture these events using EventBridge: https://repost.aws/knowledge-center/fargate-spot-termination-notice, however, curious to know why code didn't pick "SIGTERM" event.

질문됨 5달 전95회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠