When users have completed the retirement process a job will archive their retirement rows to an encrypted S3 bucket for auditing purposes. The retirement should be locked down to just those with a need to access that sensitive information. The process for setting this up from the Athena end and querying that data is detailed herein.

Configure S3

Gather Some Data

Configure Athena

Querying Athena

If everything is set up correctly you should now be able to issue queries against the encrypted, archived files securely. Here are some useful sample queries to run:

SELECT * FROM "your database name"."your table name"
LIMIT 10;

SELECT * FROM "your database name"."your table name"
WHERE original_username = 'username';

SELECT * FROM "your database name"."your table name"
WHERE original_email = 'deleteme7@foo.invalid';

SELECT * FROM "your database name"."your table name"
WHERE retirement_request_date < timestamp '2019-05-29 12:38:51.059'