The Amazon S3 destination is available for the Archive Logs template. Use this destination to send your logs in Datadog-rehydratable format to an Amazon S3 bucket for archiving. You need to set up Datadog Log Archives if you haven’t already, and then set up the destination in the pipeline UI.
Copy the below policy and paste it into the Policy editor. Replace <MY_BUCKET_NAME> and <MY_BUCKET_NAME_1_/_MY_OPTIONAL_BUCKET_PATH_1> with the information for the S3 bucket you created earlier.
Choose the IAM policy you created earlier to attach to the new IAM user.
Click Next.
Optionally, add tags.
Click Create user.
Create access credentials for the new IAM user. The AWS access key and AWS secret access key are added as environment variables in the Install the Observability Pipelines Worker step.
Choose the IAM policy you created earlier to attach to the new IAM user.
Click Next.
Optionally, add tags.
Click Create user.
Create access credentials for the new IAM user. The AWS access key and AWS secret access key are added later as environment variables when you install the Observability Pipelines Worker.
Choose the IAM policy you created earlier to attach to the new IAM user.
Click Next.
Optionally, add tags.
Click Create user.
Create access credentials for the new IAM user. The AWS access key and AWS secret access key are added as environment variables in the Install the Observability Pipelines Worker step.
Add a query that filters out all logs going through log pipelines so that none of those logs go into this archive. For example, add the query observability_pipelines_read_only_archive, assuming no logs going through the pipeline have that tag added.
Select AWS S3.
Select the AWS account that your bucket is in.
Enter the name of the S3 bucket.
Optionally, enter a path.
Check the confirmation statement.
Optionally, add tags and define the maximum scan size for rehydration. See Advanced settings for more information.
Set up the Amazon S3 destination and its environment variables when you set up an Archive Logs pipeline. The information below is configured in the pipelines UI.
Enter the S3 bucket name for the S3 bucket you created earlier.
Enter the AWS region the S3 bucket is in.
Enter the key prefix.
Prefixes are useful for partitioning objects. For example, you can use a prefix as an object key to store objects under a particular directory. If using a prefix for this purpose, it must end in / to act as a directory path; a trailing / is not automatically added.
See template syntax if you want to route logs to different object keys based on specific fields in your logs.
Select the storage class for your S3 bucket in the Storage Class dropdown menu.
Your AWS access key ID and AWS secret access key are set as environment variables when you install the Worker later.