Data Retention of PMM running under AWS

How do I change data retention of PMM server (METRICS_RETENTION & QUERIES_RETENTION) configured using AWS AMI. I see option to change for docker but unable to do for PMM configured with AWS AMI

First, let me note that there is a simple way of doing this in v2: https://www.percona.com/doc/percona-monitoring-and-management/2.x/faq.html#how-to-control-data-retention-for-pmm

However, there is a workaround for v1 deployed on AMI. Login to the EC2, and edit two files:
/etc/sysconfig/prometheus1 to modify --storage.local.retention under OPTIONS: 

OPTIONS="--storage.local.retention=720h --storage.local.chunk-encoding-version=2 --web.external-url=http://localhost:9094/prometheus1/"

/etc/sysconfig/prometheus to modify --storage.tsdb.retention under OPTIONS:

OPTIONS="--storage.tsdb.retention=720h --web.enable-lifecycle --web.enable-admin-api --web.external-url=http://localhost:9090/prometheus/"

and restart the services:

$ systemctl restart prometheus.service
$ systemctl restart prometheus1.service

These changes may not survive an upgrade, so be on the lookout in case you upgrade!