创建 Lightsail 实例并安装 CodeDeploy 代理

Create a Lightsail instance and install the CodeDeploy agent

在遵循 this tutorial 的同时,我使用所需的脚本创建了实例。然而,当我 ssh 进入 运行

sudo service codedeploy-agent status

我遇到了错误

Redirecting to /bin/systemctl status codedeploy-agent.service

Unit codedeploy-agent.service could not be found.

如何解决?

如果我使用 Amazon Linux 2 创建实例,ssh 进入 运行

sudo service codedeploy-agent status

然后会得到错误

Redirecting to /bin/systemctl status codedeploy-agent.service

Unit codedeploy-agent.service could not be found.

为了修复它,创建了一个新实例,但这次确保使用 Amazon Linux。

现在,当运行宁

sudo service codedeploy-agent status

我得到以下结果

The AWS CodeDeploy agent is running as PID 2780