Tips / guidelines for archiving old events?

Please forgive me if I’ve missed this in the documentation, but I can’t seem to find any guidelines on how to archive old events. In the documentation, I saw the cleanup command, which bulk deletes events older than X days. However, for our setup in AWS we were wondering if we could bulk export old logs to some sort of flat file and store them in Glacier.

If there is no way provided in the service, could we talk directly to the Postgres database, export some sort of flat file there and then use the provided cleanup command?

Thanks in advance for any suggestions you may have!