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
You can also trigger batch replication jobs using the `--replication-type BATCH` flag.
103
+
104
+
This currently supports the `AWS::SSM::Parameter` resource type and allows you to replicate all parameters under a given path prefix.
105
+
106
+
For example, to replicate all parameters under `/dev/`:
107
+
108
+
```bash
109
+
localstack replicator start \
110
+
--replication-type BATCH \
111
+
--resource-type AWS::SSM::Parameter \
112
+
--resource-identifier /dev/
113
+
```
114
+
115
+
The `--resource-identifier` in this case must be a path prefix (not a wildcard or glob). All parameters under that prefix will be discovered and replicated.
116
+
117
+
If `--replication-type` is not specified, the default is `SINGLE_RESOURCE`.
118
+
119
+
The command triggers a replication job. The output will look similar to:
103
120
104
121
```json showLineNumbers
105
122
{
@@ -112,18 +129,26 @@ The output will look similar to:
112
129
"identifier": "myParameter"
113
130
}
114
131
}
115
-
```
132
+
```
116
133
117
134
:::note
118
135
-`--target-account-id` specifies the destination AWS account for replication.
119
136
If not set, the resource is replicated into account `000000000000`.
137
+
120
138
-`--target-region-name` specifies the destination AWS region.
121
139
If not set, the resource is replicated into the default region from the provided credentials.
122
140
:::
123
141
142
+
124
143
#### Using the HTTP API
125
144
126
-
To trigger replication via the HTTP API, send a `POST` request to `http://localhost.localstack.cloud:4566/_localstack/replicator/jobs` with the following payload:
145
+
To trigger replication via the HTTP API, send a `POST` request to:
@@ -143,13 +168,36 @@ To trigger replication via the HTTP API, send a `POST` request to `http://localh
143
168
}
144
169
```
145
170
171
+
To replicate multiple SSM parameters under a shared path, you can use `replication_type: "BATCH"` with the same `resource_type` and a path-style `identifier`.
172
+
173
+
For example:
174
+
175
+
```json
176
+
{
177
+
"replication_type": "BATCH",
178
+
"replication_job_config": {
179
+
"resource_type": "AWS::SSM::Parameter",
180
+
"identifier": "/dev/"
181
+
},
182
+
"source_aws_config": {
183
+
"aws_access_key_id": "...",
184
+
"aws_secret_access_key": "...",
185
+
"region_name": "..."
186
+
}
187
+
}
188
+
```
189
+
190
+
This triggers a batch replication job that discovers and replicates all SSM parameters under the `/dev/` path prefix.
191
+
192
+
146
193
### Check Replication Job Status
147
194
148
195
Replication jobs run asynchronously, so you need to poll their status to check when they finish.
149
196
150
197
#### Using the LocalStack CLI
151
198
152
199
When creating a replication job, the response includes a `job_id`.
0 commit comments