When you ssh into the EC2 instance, try doing this to get the database created.
```
sudo su
bundle exec rails db:create
exit
```
I believe they've changed the permissions of the ec2 user and you cannot login as the www user.
I think that it depends on the goals of the service object. If it were only internal interactions then this would make sense. However, if the issue was an error with an external api that you've wrapped your service object around, I would probably prefer this method.
That is indeed very strange! I just reprovisioned my development environment this morning and tested this with the latest Rails and devise. It is happening to me too! I'm guessing that when the generator is being ran, it is injecting the RAILS_ENV as an attribute and devise is picking it up somehow... Really weird!
Using this works without adding in the weird ENV
```
gem 'devise'
run 'bundle install'
generate(:scaffold, 'user', 'name')
generate('devise:install')
generate('devise','User')
```