In short, the packages provided in the Alexandria Utility Library for PL/SQL allow you to set up a schema-level backup of files from your database to Amazon's Simple Storage Service (S3).
At the end of that article I mentioned that you should use AWS Identity and Access Management (IAM) to create a separate backup user that has minimal privileges, to reduce the risk if the password ("Secret Access Key" in S3 terminology) is ever exposed. By creating a separate user which only has upload ("PutObject") permissions on your S3 folder, and no privileges to list file contents, delete or download files, you can limit the damage that someone with a stolen password can do.
Here's how to set this up:
- Go to your AWS admin console.
- Go to S3 service and create a new bucket (your-bucket-name).
- Create a folder called "backup".
- Optionally, create subfolders "backup/schemas" and "backup/apps".
- Go to IAM service.
- Go to Groups and create a new group ("MySiteBackupUsers"). Do not add any of the default policies.
- Go to Permissions for the group and under "Inline Policies", click on "Create Group Policy". Choose "Custom Policy".
- Policy Name: "UploadFilesToBackup".
- Add the following policy definition:
Here is a screenshot:
Then go to Users and click "Create New Users". Enter a user name ("MySiteBackupUser"). After the user has been created, click on "Show User Security Credentials" and copy the values (Access Key ID and Secret Access Key) into your backup script settings.
Finally, add the user to the newly created user group (add user "MySiteBackupUser" to group "MySiteBackupUsers").
That's it, you now have a minimally privileged user account that you can use for your S3 backup scripts from PL/SQL.