このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、
お気軽にご連絡ください。
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.
If you already have a Datadog Log Archive configured for Observability Pipelines, skip to Set up the destination for your pipeline.
You need to have Datadog’s AWS integration installed to set up Datadog Log Archives.
Create an Amazon S3 bucket
- Navigate to Amazon S3 buckets.
- Click Create bucket.
- Enter a descriptive name for your bucket.
- Do not make your bucket publicly readable.
- Optionally, add tags.
- Click Create bucket.
Set up an IAM policy that allows Workers to write to the S3 bucket
- Navigate to the IAM console.
- Select Policies in the left side menu.
- Click Create policy.
- Click JSON in the Specify permissions section.
- 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.{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DatadogUploadAndRehydrateLogArchives",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:GetObject"],
"Resource": "arn:aws:s3:::<MY_BUCKET_NAME_1_/_MY_OPTIONAL_BUCKET_PATH_1>/*"
},
{
"Sid": "DatadogRehydrateLogArchivesListBucket",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::<MY_BUCKET_NAME>"
}
]
}
- Click Next.
- Enter a descriptive policy name.
- Optionally, add tags.
- Click Create policy.
Create an IAM user
Create an IAM user and attach the IAM policy you created earlier to it.
- Navigate to the IAM console.
- Select Users in the left side menu.
- Click Create user.
- Enter a username.
- Click Next.
- Select Attach policies directly.
- 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.
Create an IAM user
Create an IAM user and attach the IAM policy you created earlier to it.
- Navigate to the IAM console.
- Select Users in the left side menu.
- Click Create user.
- Enter a username.
- Click Next.
- Select Attach policies directly.
- 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.
Create an IAM user
Create an IAM user and attach the IAM policy you created earlier to it.
- Navigate to the IAM console.
- Select Users in the left side menu.
- Click Create user.
- Enter a username.
- Click Next.
- Select Attach policies directly.
- 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.
Connect the S3 bucket to Datadog Log Archives
- Navigate to Datadog Log Forwarding.
- Click New archive.
- Enter a descriptive archive name.
- 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.
- Click Save.
See the Log Archives documentation for additional information.
Set up the destination for your pipeline
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. - 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.
Set the environment variables
Enter the AWS access key ID and AWS secret access key for the S3 archive bucket you created earlier.
How the destination works
Event batching
A batch of events is flushed when one of these parameters is met. See event batching for more information.
Max Events | Max Bytes | Timeout (seconds) |
---|
None | 100,000,000 | 900 |