Resource
The Resource resource allows you to manage AWS LakeFormation Resources for data lake management and governance, enabling fine-grained access control.
Minimal Example
Section titled “Minimal Example”Create a basic LakeFormation resource with required properties:
import AWS from "alchemy/aws/control";
const lakeFormationResource = await AWS.LakeFormation.Resource("basicLakeFormationResource", { ResourceArn: "arn:aws:s3:::my-data-lake", UseServiceLinkedRole: true});
Advanced Configuration
Section titled “Advanced Configuration”Configure a LakeFormation resource with additional optional settings, such as federation and hybrid access:
const advancedLakeFormationResource = await AWS.LakeFormation.Resource("advancedLakeFormationResource", { ResourceArn: "arn:aws:s3:::my-data-lake", UseServiceLinkedRole: true, WithFederation: true, HybridAccessEnabled: true, RoleArn: "arn:aws:iam::123456789012:role/LakeFormationRole"});
Resource Adoption
Section titled “Resource Adoption”Adopt an existing LakeFormation resource instead of failing when the resource already exists:
const adoptExistingResource = await AWS.LakeFormation.Resource("adoptExistingResource", { ResourceArn: "arn:aws:s3:::my-existing-data-lake", UseServiceLinkedRole: false, adopt: true});
Hybrid Access Configuration
Section titled “Hybrid Access Configuration”Create a LakeFormation resource with hybrid access enabled for cross-account data sharing:
const hybridAccessResource = await AWS.LakeFormation.Resource("hybridAccessResource", { ResourceArn: "arn:aws:s3:::my-hybrid-data-lake", UseServiceLinkedRole: true, HybridAccessEnabled: true, RoleArn: "arn:aws:iam::123456789012:role/HybirdAccessRole"});