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
- If you run the Lambda function outside a VPC, you must enable public access to your database instance, a non VPC Lambda function executes on the public internet.
50
-
- If you run the Lambda function inside a VPC, you must allow access from the Lambda Security Group to your database instance. Also you must either add a NAT gateway ([chargeable](https://aws.amazon.com/vpc/pricing/)) to your VPC so the Lambda can connect to S3 over the Internet, or add an [S3 VPC endpoint (free)](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html) and allow traffic to the appropriate S3 prefixlist.
59
+
- If you run the Lambda function outside a VPC, you must enable public access to your database instance, a non VPC Lambda function executes on the public internet.
60
+
- If you run the Lambda function inside a VPC, you must allow access from the Lambda Security Group to your database instance. Also you must either add a NAT gateway ([chargeable](https://aws.amazon.com/vpc/pricing/)) to your VPC so the Lambda can connect to S3 over the Internet, or add an [S3 VPC endpoint (free)](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html) and allow traffic to the appropriate S3 prefixlist.
51
61
52
62
#### Encryption
53
63
@@ -59,7 +69,7 @@ You can add an encryption key to your event, e.g.
@@ -88,14 +98,13 @@ Your context may require that you use IAM-based authentication to log into the P
88
98
Support for this can be enabled my making your Cloudwatch Event look like this.
89
99
90
100
```json
91
-
92
101
{
93
-
"PGDATABASE": "dbname",
94
-
"PGUSER": "postgres",
95
-
"PGHOST": "host",
96
-
"S3_BUCKET": "db-backups",
97
-
"ROOT": "hourly-backups",
98
-
"USE_IAM_AUTH": true
102
+
"PGDATABASE": "dbname",
103
+
"PGUSER": "postgres",
104
+
"PGHOST": "host",
105
+
"S3_BUCKET": "db-backups",
106
+
"ROOT": "hourly-backups",
107
+
"USE_IAM_AUTH": true
99
108
}
100
109
```
101
110
@@ -111,67 +120,69 @@ NOTE: the execution role for the Lambda function must have access to GetSecretVa
111
120
Support for this can be enabled by setting the SECRETS_MANAGER_SECRET_ID, so your Cloudwatch Event looks like this:
112
121
113
122
```json
114
-
115
123
{
116
-
"SECRETS_MANAGER_SECRET_ID": "my/secret/id",
117
-
"S3_BUCKET": "db-backups",
118
-
"ROOT": "hourly-backups"
124
+
"SECRETS_MANAGER_SECRET_ID": "my/secret/id",
125
+
"S3_BUCKET": "db-backups",
126
+
"ROOT": "hourly-backups"
119
127
}
120
128
```
121
129
122
-
If you supply `SECRETS_MANAGER_SECRET_ID`, you can ommit the 'PG*' keys, and they will be fetched from your SecretsManager secret value instead with the following mapping:
123
-
124
-
| Secret Value | PG-Key |
125
-
| ------------- | ------------- |
126
-
| username | PGUSER |
127
-
| password | PGPASSWORD |
128
-
| dbname | PGDATABASE |
129
-
| host | PGHOST |
130
-
| port | PGPORT |
130
+
If you supply `SECRETS_MANAGER_SECRET_ID`, you can ommit the 'PG\*' keys, and they will be fetched from your SecretsManager secret value instead with the following mapping:
131
131
132
+
| Secret Value | PG-Key |
133
+
| ------------ | ---------- |
134
+
| username | PGUSER |
135
+
| password | PGPASSWORD |
136
+
| dbname | PGDATABASE |
137
+
| host | PGHOST |
138
+
| port | PGPORT |
132
139
133
-
You can provide overrides in your event to any PG* keys as event parameters will take precedence over secret values.
140
+
You can provide overrides in your event to any PG\* keys as event parameters will take precedence over secret values.
134
141
135
142
## Developer
136
143
137
144
#### Bundling a new `pg_dump` binary
145
+
138
146
1. Launch an EC2 instance with the Amazon Linux 2 AMI
0 commit comments