Athena database not encrypted
This product is not supported for your selected
Datadog site. (
).
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、
お気軽にご連絡ください。
Id: b2315cae-b110-4426-81e0-80bb8640cdd3
Cloud Provider: AWS
Platform: Terraform
Severity: High
Category: Encryption
Learn More
Description
AWS Athena databases store query results in S3 buckets, and when not encrypted, sensitive data may be exposed to unauthorized access, potentially leading to data breaches and compliance violations. Encryption at rest protects this data using keys managed either by AWS or customer-managed KMS keys. To secure your implementation, add an encryption_configuration block to your aws_athena_database resource, as shown below:
resource "aws_athena_database" "secure_example" {
name = "database_name"
bucket = aws_s3_bucket.example.bucket
encryption_configuration {
encryption_option = "SSE_KMS"
kms_key = "your_kms_key_arn"
}
}
Compliant Code Examples
resource "aws_s3_bucket" "hoge" {
bucket = "hoge"
}
resource "aws_athena_database" "hoge" {
name = "database_name"
bucket = aws_s3_bucket.hoge.bucket
encryption_configuration {
encryption_option = "SSE_KMS"
kms_key = "SSE_KMS"
}
}
Non-Compliant Code Examples
resource "aws_s3_bucket" "hoge" {
bucket = "hoge"
}
resource "aws_athena_database" "hoge" {
name = "database_name"
bucket = aws_s3_bucket.hoge.bucket
}