# How to Set Up NTP on Ubuntu in AWS

1. #### Configure NTP in timesyncd.conf
    

```bash
echo "NTP=169.254.169.123" | sudo tee -a /etc/systemd/timesyncd.conf
cat /etc/systemd/timesyncd.conf
```

1. Enable the timesyncd.service
    

```bash
sudo systemctl unmask systemd-timesyncd.service
sudo apt install systemd-timesyncd -y
```

1. Enable the timesyncd.service at boot & Restart
    

```bash
sudo systemctl enable systemd-timesyncd.service
sudo  systemctl restart systemd-timesyncd
```

1. Set the system time to be synchronized with NTP
    

```bash
sudo  timedatectl set-ntp true
```
