import os
from dataclasses import dataclass


@dataclass
class AwsConfig:
    region: str
    s3_bucket_processed: str
    resource_tag: str
    lifecycle_days: int = 30


def load_config_from_env() -> AwsConfig:
    return AwsConfig(
        region=os.getenv("AWS_REGION", "us-east-1"),
        s3_bucket_processed=os.getenv("S3_BUCKET_PROCESSED", "ransom-analysis-processed"),
        resource_tag=os.getenv("RESOURCE_TAG", "ransom-analysis:local"),
        lifecycle_days=int(os.getenv("S3_LIFECYCLE_DAYS", "30")),
    )


