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
@@ -28,9 +28,9 @@ The Segment Tracking API processes data from your sources, and collects the Even
28
28
29
29
## Create a new destination
30
30
31
-
Complete either [Create an IAM role in the AWS console](#create-an-iam-role-in-the-aws-console), [Create an IAM role using the AWS CLI](#create-an-iam-role-using-the-aws-cli), or [Configure resources using Terraform](#configure-resources-using-terraform) to set up the AWS S3 Destination with IAM Role Support.
31
+
Complete either [Create an IAM role in the AWS console](#create-an-iam-role-in-the-aws-console), [Create an IAM role using the AWS CLI](#create-an-iam-role-using-the-aws-cli), or [Create IAM roles using Terraform](#create-iam-roles-using-terraform) to set up the AWS S3 Destination with IAM Role Support.
32
32
33
-
All three setup methods provide a base level of permissions to Segment (for example, the correct IAM role to allow Segment to send data to your S3 bucket). If you want stricter permissions or other custom configurations, you can customize these setup instructions manually.
33
+
All three setup methods provide a base level of permissions to Segment. If you want stricter permissions or other custom configurations, you can customize these setup instructions manually.
34
34
35
35
### Create an IAM role in the AWS console
36
36
@@ -192,12 +192,106 @@ To create an S3 IAM role, you must first install and configure the AWS CLI on yo
192
192
> info ""
193
193
> To verify that the IAM role is created, navigate to the AWS console and open the IAM Management Console. On the Permissions tab, verify that there is a `segment-s3-putobject` Permissions policy.
194
194
195
-
### Configure resources using Terraform
195
+
### Create IAM roles using Terraform
196
196
197
-
You can use the instructions provided in the open source Terraform module to automate some of the required setup steps for this destination. The setup process for AWS S3 uses Terraform v12.0+. The AWS provider must use v4, which is included in our example `main.tf`.
197
+
You can run the provided Terraform module from your command line to create the IAM roles required for this destination.
198
198
199
-
> note "Support for the AWS S3 Terraform module"
200
-
> If you’re familiar with Terraform, you can modify the module to meet your organization’s needs, however, Segment guarantees support only for the template as provided.
199
+
> warning "Support for the AWS S3 Terraform module"
200
+
> If you’re familiar with Terraform, you can modify the module to meet your organization’s needs: however, Segment guarantees support only for the template as provided.
201
+
202
+
To set up the required IAM roles for this destination, run the following Terraform module from your command line:
### Add the AWS S3 with IAM Role Support Destination
203
297
@@ -261,23 +355,43 @@ This procedure uses Segment's Public API to migrate an existing Amazon S3 destin
261
355
262
356
To migrate to the AWS S3 destination using the Public API:
263
357
358
+
#### Step 1 - Verify your configuration
359
+
264
360
1. Open the Segment app, select the Connections tab and then select Catalog.
265
361
2. From the Catalog, select the Storage Destinations tab and select the **AWS S3** destination.
266
362
3. On the AWS S3 destination page, click the **Configure AWS S3** button.
267
363
4. Configure your AWS S3 destination. When asked for the bucket name, enter `<YOUR_BUCKET_NAME>/segment-logs/test`.
268
364
5. Enable the destination, and verify data is received at `<YOUR_BUCKET_NAME>/segment-logs/test/segment-logs`. <br/>**Note:** If the folder receives data, continue to the next step. If you don't see log entries, check the trust relationship document and IAM policy attached to your IAM role.
269
-
6. Create your new AWS S3 destination using the [`create destination`](https://api.segmentapis.com/docs/connections/destinations/#create-destination) Public API call. The `sourceId`, `metadataId`, and `settings` parameters are required. An example of the parameters is below: <br/>
365
+
366
+
367
+
#### Step 2 - Migrate an existing destination using the Public API
368
+
369
+
1. Identify the source IDs for your old Amazon S3 destination(s). You can use the Public API to return information about a list of your Amazon S3 destinations or an individual destination. <br/>
370
+
To return a list of all of your Amazon S3 destinations, use the [`list destinations`](https://api.segmentapis.com/docs/connections/destinations/#list-destinations) call and filter the results using metadata id `54f418c3db31d978f14aa925` or slug `amazon-s3`: <br/>
371
+
```shell
372
+
curl -vvv --location --request GET https://api.segmentapis.com/destinations?pagination.count=1 \
373
+
--header 'Content-Type: application/json' \
374
+
--header 'Authorization: Bearer ...' \
375
+
--data-raw '
376
+
```
377
+
To return the information for an individual Amazon S3 destination, use the [`get destination`](https://api.segmentapis.com/docs/connections/destinations/#get-destination) call, using the destination ID for your individual Amazon S3 destination (**Note:** The destination ID for your Amazon S3 source is visible in the Segment app, on the destination's settings page.) <br/>
378
+
```shell
379
+
curl -vvv --location --request GET https://api.segmentapis.com/destinations/$DESTINATION_ID \
380
+
--header 'Content-Type: application/json' \
381
+
--header 'Authorization: Bearer ...' \
382
+
--data-raw '
383
+
```
384
+
2. Create your new AWS S3 destination using the [`create destination`](https://api.segmentapis.com/docs/connections/destinations/#create-destination) Public API call. The `sourceId`, `metadataId`, and `settings` parameters are required. An example of the parameters is below: <br/>
270
385
```json
271
386
{
272
387
"sourceId": "$SOURCE_ID",
273
388
"metadataId": "60be92c8dabdd561bf6c9130",
274
389
"name": "AWS S3",
275
390
"settings": {
276
-
"region": "XYZ",
277
-
"s3Bucket": "test",
391
+
"region": "$BUCKET_REGION",
392
+
"s3Bucket": "$YOUR_BUCKET_NAME",
278
393
"iamRoleArn": "$IAM_ROLE_ARN"
279
394
}
280
-
}
281
395
```
282
396
<br/>**Optional:** You can create a destination that's not enabled automatically upon creation by setting `enabled` to `false` when creating the new AWS S3 destination:
8. Identify the source IDs for your old Amazon S3 destination(s). You can use the Public API to return information about a list of your Amazon S3 destinations or an individual destination. <br/><br/>
297
-
To return a list of all of your Amazon S3 destinations, use the [`list destinations`](https://api.segmentapis.com/docs/connections/destinations/#list-destinations) call and filter the results using metadata id `54f418c3db31d978f14aa925` or slug `amazon-s3`: <br/>
298
-
```shell
299
-
curl -vvv --location --request GET https://api.segmentapis.com/destinations?pagination.count=1 \
300
-
--header 'Content-Type: application/json' \
301
-
--header 'Authorization: Bearer ...' \
302
-
--data-raw '
303
-
```
304
-
To return the information for an individual Amazon S3 destination, use the [`get destination`](https://api.segmentapis.com/docs/connections/destinations/#get-destination) call, using the destination ID for your individual Amazon S3 destination (**Note:** The destination ID for your Amazon S3 source is visible in the Segment app, on the destination's settings page.) <br/>
305
-
```shell
306
-
curl -vvv --location --request GET https://api.segmentapis.com/destinations/$DESTINATION_ID \
307
-
--header 'Content-Type: application/json' \
308
-
--header 'Authorization: Bearer ...' \
309
-
--data-raw '
310
-
```
311
410
312
-
9. Disable the Amazon S3 destinations using the following command, replacing `$DESTINATION_ID` with the ID of your Amazon S3 destination you found in the previous step:
411
+
3. Disable the Amazon S3 destinations using the following command, replacing `$DESTINATION_ID` with the ID of your Amazon S3 destination you found in a previous step:
> You must migrate to the new S3 destination before you disable your legacy destination to ensure Segment continues to deliver data to your S3 bucket.
426
+
> You must migrate to the new S3 destination before you disable your legacy destination to ensure Segment continues to deliver data to your S3 bucket.
328
427
329
428
## Test your migrated source
330
429
You can validate that you configured your migrated source correctly on the AWS S3 destination page in the Segment app.
@@ -389,4 +488,4 @@ For user-property destinations, Segment sends an [identify](/docs/connections/sp
389
488
390
489
When you first create an audience, Personas sends an Identify call for every user in that audience. Later audience syncs send updates for users whose membership has changed since the last sync.
0 commit comments