The systemctl command is provided by the systemd package which is not available on Amazon Linux 2018.03.
Instead you can use the service command to restart the Apache server.
sudo service httpd restart
I recommend to check the configuration first.
sudo service httpd configtest
To use systemd with Amazon Linux, you can use Amazon Linux 2 with provides systemd and the systemctl command https://aws.amazon.com/amazon-linux-2/.
AWS Managed Active Directory - Disk error and restart capabilityasked 3 months ago
getting 502 bad gateway errors every time I turn on ec2 instanceasked 2 months ago
Best way to restart a Greengrass component, from another componentasked 9 months ago
Restart MWAA environment programmaticallyasked a year ago
cant run an smtp docker container on linux AMIAccepted Answerasked 6 months ago
Greengrass Core V2 - Restart component on config changeasked 4 months ago
systemctl command doesn't work inside of amazonlinux:latest containerasked 3 years ago
Linux Error on httpd restart - systemctl: command not foundAccepted Answerasked 3 years ago
Unable to restart apacheasked a year ago
IoT Edge Greengrass command line for restartAccepted Answerasked 8 months ago