Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CfnCrawler: Missing parameter LakeFormationConfiguration in CDK Construct but present in aws cli #29246

Closed
lorenzo-necto opened this issue Feb 24, 2024 · 4 comments
Labels
@aws-cdk/aws-glue Related to AWS Glue documentation This is a problem with documentation. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3

Comments

@lorenzo-necto
Copy link

lorenzo-necto commented Feb 24, 2024

Describe the issue

Hello!

We have aws docs explaining how to create a Crawler with LakeFormation Credentials via Console or AWS CLI, but there is no way of doing it via CDK yet.

The AWS CLI command is aws glue create-crawler --cli-input-json '{ ... "LakeFormationConfiguration" : {} ...}'

here's the reference Docs

Can this param be added to CDK CfnCrawler?

ToDo

Add 'LakeFormationConfiguration' parameter for CfnCrawler

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnCrawler.html

@lorenzo-necto lorenzo-necto added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Feb 24, 2024
@lorenzo-necto lorenzo-necto changed the title CfnCrawler: Missing parameter LakeFormationConfiguration present in aws cli CfnCrawler: Missing parameter LakeFormationConfiguration in CDK Construct but present in aws cli Feb 24, 2024
@pahud
Copy link
Contributor

pahud commented Feb 26, 2024

This is what we have in the cloudformation spec for CfnCrawler and looks like there's no specific config for LakeFormationConfiguration. I assume this probably could be configured in the Configuration.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2024
@lorenzo-necto
Copy link
Author

lorenzo-necto commented Feb 26, 2024

Hey! Thanks for the quick reply! I tried to include it in the Configuration param but no luck, it says it is not a valid key for that Configuration dictionary parameter.

Yes! I tried injecting it low level to the CF yml via code, but I also noticed that the CF docs don't have it.

The GUI does though, and the CLI command exists, for now I am doing it via GUI, but it would be great to understand if this will be supported via IaC, or if there is another way of being sure that it is enabled

This is where the CLI command reference is : https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html#crawler-lf-integ

aws glue --profile demo create-crawler --debug --cli-input-json '{ "Name": "prod-test-crawler", "Role": "arn:aws:iam::111122223333:role/service-role/AWSGlueServiceRole-prod-test-run-role", "DatabaseName": "prod-run-db", "Description": "", "Targets": { "S3Targets":[ { "Path": "s3://crawl-testbucket" } ] }, "SchemaChangePolicy": { "UpdateBehavior": "LOG", "DeleteBehavior": "LOG" }, "RecrawlPolicy": { "RecrawlBehavior": "CRAWL_EVERYTHING" }, "LineageConfiguration": { "CrawlerLineageSettings": "DISABLE" }, "LakeFormationConfiguration": { "UseLakeFormationCredentials": true, "AccountId": "111122223333" }, "Configuration": { "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": "InheritFromTable" }, "Tables": {"AddOrUpdateBehavior": "MergeNewColumns" } }, "Grouping": { "TableGroupingPolicy": "CombineCompatibleSchemas" } }, "CrawlerSecurityConfiguration": "", "Tags": { "KeyName": "" } }'

It might be that they are quite new, there is also a LineageConfiguration param in this example, so those might be in queue to be added and still experimental, not sure

@tim-finnigan tim-finnigan added the feature-request A feature should be added or improved. label Mar 14, 2024
@vinayak-kukreja vinayak-kukreja added @aws-cdk/aws-glue Related to AWS Glue and removed package/tools Related to AWS CDK Tools or CLI labels Apr 12, 2024
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
@lorenzo-necto
Copy link
Author

lorenzo-necto commented Aug 17, 2024

this seems implemented thank you!!

It looks like it's working!
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnCrawler.LakeFormationConfigurationProperty.html

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-glue Related to AWS Glue documentation This is a problem with documentation. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

No branches or pull requests

5 participants