@mapbox/cloudfriend
Version:
Helper functions for assembling CloudFormation templates in JavaScript
75 lines • 1.84 kB
JSON
{
"AWSTemplateFormatVersion": "2010-09-09",
"Metadata": {},
"Parameters": {},
"Rules": {},
"Mappings": {},
"Conditions": {},
"Resources": {
"OptimizerRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {}
}
},
"MyTable": {
"Type": "AWS::Glue::Table",
"Properties": {
"CatalogId": {
"Ref": "AWS::AccountId"
},
"DatabaseName": "my_database",
"Name": "my_table",
"OpenTableFormatInput": {
"IcebergInput": {
"MetadataOperation": "CREATE",
"Version": "2",
"IcebergTableInput": {
"Location": "s3://fake/location",
"Schema": {
"Type": "struct",
"Fields": [
{
"Name": "column",
"Type": "string",
"Id": 1,
"Required": true
}
]
}
}
}
}
}
},
"MyTableRetentionOptimizer": {
"Type": "AWS::Glue::TableOptimizer",
"DependsOn": "MyTable",
"Properties": {
"CatalogId": {
"Ref": "AWS::AccountId"
},
"DatabaseName": "my_database",
"TableName": "my_table",
"Type": "retention",
"TableOptimizerConfiguration": {
"RoleArn": {
"Fn::GetAtt": [
"OptimizerRole",
"Arn"
]
},
"Enabled": true,
"RetentionConfiguration": {
"IcebergConfiguration": {
"SnapshotRetentionPeriodInDays": 7,
"NumberOfSnapshotsToRetain": 3,
"CleanExpiredFiles": false
}
}
}
}
}
},
"Outputs": {}
}