##Create RDS with postgres #### Opsworks has a bug, even you registerd a postgres RDS, the adapter is still using 'mysql' ### WORKAROUND: ##Create mysql layer (fake) don't assign instances ##Use custom Stack JSON *Be careful with adapter ``` { "deploy": { "ticket_to_paradise": { "database": { "adapter": "postgis", "encoding": "utf8", "host": "your-host", "port": "5432", "database": "attp_db_2", "pool": "5", "username": "your-password", "password": "your-username", } } } } ``` ##Add missing postgres package In OS package, Add postgresql93-devel ##Add security group -> opsworks-rails-layer. ## Enable postgis extension ###login into psql ``` psql -h -p -u ``` ### Add [postgis extension](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.PostGIS) ##Then db:migrate and db:seed If you created your db before. time to drop it and recreate it!