You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Edit the role and attach the policy "AmazonS3FullAccess"
19
20
- Save
20
-
3. Configuration -> Execution role
21
-
- Edit the role and attach the policy "AmazonS3FullAccess"
22
-
4. Test
21
+
3. Test
23
22
- Create new test event, e.g.:
24
23
```json
25
24
{
@@ -33,7 +32,7 @@ It can be configured to run periodically using CloudWatch events.
33
32
```
34
33
- *Test* and check the output
35
34
36
-
5. Create a CloudWatch rule:
35
+
4. Create a CloudWatch rule:
37
36
- Event Source: Schedule -> Fixed rate of 1 hour
38
37
- Targets: Lambda Function (the one created in step #1)
39
38
- Configure input -> Constant (JSON text) and paste your config (as per step #4)
@@ -93,10 +92,10 @@ Support for this can be enabled my making your Cloudwatch Event look like this.
93
92
{
94
93
"PGDATABASE": "dbname",
95
94
"PGUSER": "postgres",
96
-
"USE_IAM_AUTH": true,
97
95
"PGHOST": "host",
98
96
"S3_BUCKET" : "db-backups",
99
-
"ROOT": "hourly-backups"
97
+
"ROOT": "hourly-backups",
98
+
"USE_IAM_AUTH": true
100
99
}
101
100
```
102
101
@@ -107,13 +106,38 @@ If you still provide it, it will be ignored.
107
106
108
107
#### Bundling a new `pg_dump` binary
109
108
1. Launch an EC2 instance with the Amazon Linux 2 AMI
110
-
2. Connect via SSH and [Install PostgreSQL using yum](https://stackoverflow.com/questions/55798856/deploy-postgres11-to-elastic-beanstalk-requires-etc-redhat-release).
111
-
3. Locally, create a new directory for your pg_dump binaries: `mkdir bin/postgres-11.6`
0 commit comments