While following this tutorial, I created the instance with the desired script. Yet, when I ssh in and run
sudo service codedeploy-agent status
I'm getting the error
Redirecting to /bin/systemctl status codedeploy-agent.service
Unit codedeploy-agent.service could not be found.
What can be done to fix it?
If I created the instance using Amazon Linux 2, ssh in and run
sudo service codedeploy-agent status
then would get the error
Redirecting to /bin/systemctl status codedeploy-agent.service
Unit codedeploy-agent.service could not be found.
In order to fix it, created a new instance but this time made sure to be using Amazon Linux (as opposed to Amazon Linux 2).
Now, when running
sudo service codedeploy-agent status
I get the following result
The AWS CodeDeploy agent is running as PID 2780
P.S. - if you still want to use Amazon Linux 2 instead, consider reading this question and it's answer.