Home > database >  What does encryption_configuration in terraform aws_athena_database resource
What does encryption_configuration in terraform aws_athena_database resource

Time:06-02

I don't understand what encryption_configuration agrument doing, why I have to enable it? Because when I applied the code below, I cannot find the encryption status of athena database.

resource "aws_athena_database" "example" {
  name   = "database_name"
  bucket = aws_s3_bucket.mybucket.bucket
  encryption_configuration {
     encryption_option = "SSE_KMS"
     kms_key       = aws_kms_key.mykey.arn
  }
}

I have a athena database without enable encryption, so if I enable it, do I lost any data in this database?

CodePudding user response:

do I lost any data in this database

No, because Athena does not store your actual data. It only stores information about your data. From docs:

Databases are a logical grouping of tables, and also hold only metadata and schema information for a dataset.

The encryption of databases in Athena is only for reading encrypted S3 and storing query results as explained in:

  • Related