Dirt overwrites custom wp-config settings for Amazon deployments breaking sites in staging environment.
Check out this sample: https://gist.github.com/blocher/fdda06368d4a26445ca0
This is based on a sample provided originally by Mathias but since edited somewhat.
Note the customizations for database variables, home and site url, WP_DEBUG, and AWS access key/secret access key settings used for S3 file storage.