Skip to content

Tutorial: Adding DB and Cache #9

@Andrew-Chen-Wang

Description

@Andrew-Chen-Wang

I'm not putting the tutorial in the README because I don't know where it should actually go? For sure it will be done before you actually deploy your initial server to ECS.

Beforehand, I'm only going to go through the database and this will be very sparse compared to my others. They should be relatively easy to configure and more straightforward than the others.

  1. Create a security group that allows PostgreSQL from the source ReverseProxy (basically the network group that you gave to your server, not the ALB/ELB). Outbound can be all.
  2. To configure the database, go to RDS.
  3. Select PostgreSQL because it's better, sorry.
  4. Configure it. Set your username, password, and database name given by cookiecutter-django's generation.
  5. Generate/press create. Click into the instance itself.
  6. Copy the endpoint (that huge url basically) and use that as your database host into parameter store. The port should still be 5432.

Costs: $50? $18 for the cache?

The steps are basically the exact same for ElastiCache, but most startups do not need it (you'll need it for Celery, but that's it). Just note that this is hella expensive. If you're in a startup, get a job first. Or buy your own server. Highly recommend the Raspberry Pi 4 if you're not going to use Gulp. I created this back when I couldn't get WiFi.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions