Deployment fails at BeforeInstall event.
Error cod :UnknownError
Script name
Message : CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server.
As checked the codedeploy agent is running fine :The AWS CodeDeploy agent is running as PID ####
And there is no log found inside deployment-instructions. Please help resolve this.
EDITED: No log inside /opt/codedeploy-agent/deployment-root/ or /opt/codedeploy-agent/deployment-root/deployment-group-ID/deployment-ID/
Log seen by running the command: cat /var/log/aws/codedeploy-agent/codedeploy-agent.log
LOGS: 2022-10-13 08:49:03 INFO [codedeploy-agent(13597)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.4.0-2218_rpm. 2022-10-13 08:49:48 INFO [codedeploy-agent(13597)]: [Aws::CodeDeployCommand::Client 200 45.500434 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:ap-south-1:009462874628:instance/i-05d7da2a813a32ab0")
2022-10-13 08:49:49 INFO [codedeploy-agent(13597)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.4.0-2218_rpm. 2022-10-13 08:50:34 INFO [codedeploy-agent(13597)]: [Aws::CodeDeployCommand::Client 200 45.061623 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:ap-south-1:009462874628:instance/i-05d7da2a813a32ab0")
2022-10-13 08:50:35 INFO [codedeploy-agent(13597)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.4.0-2218_rpm. 2022-10-13 08:51:20 INFO [codedeploy-agent(13597)]: [Aws::CodeDeployCommand::Client 200 45.042359 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:ap-south-1:009462874628:instance/i-05d7da2a813a32ab0")
2022-10-13 08:51:21 INFO [codedeploy-agent(13597)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.4.0-2218_rpm.