Amazon Web Services (AWS)
AWS is a cloud infrastructure platform.
Electric and AWS
You can use AWS to deploy any or all components of the Electric stack:
If you already run Postgres in AWS, potentially using RDS or Aurora, then it's a great idea to also deploy Electric within the same network.
Need context?
See the Deployment guide for more details.
Deploy Postgres
AWS provides Postgres hosting via RDS and Aurora. Electric works with either. You need to configure them to enable logical replication and connect with the right user.
The default wal_level
is minimal
for RDS and replica
for Aurora. It can be changed to logical
by creating a custom parameter group for the RDS instance (or the Aurora DB cluster) and setting the value of the rds.logical_replication
parameter to 1
and rebooting the instance.
The default postgres
user has the REPLICATION
role. If you need to add it to another user you can do so by granting the rds_replication
role, e.g.:
GRANT rds_replication TO someuser;
Deploy Electric
AWS provides a wide range of container hosting. For example, you can deploy Electric to AWS Elastic Container Service using AWS Fargate.
You should store Shape logs to a persistent disk (not an ephemoral filesystem). For example using Amazon Elastic File System.
Deploy your app
AWS provides a range of website hosting options. For example you can deploy a static app to AWS Amplify.
Examples
AWS Terraform
We have an example Terraform repo at electric-sql/terraform-aws.