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

Glue database: is locationUri required? #5268

Closed
cartmanez opened this issue Dec 2, 2019 · 4 comments · Fixed by #5784
Closed

Glue database: is locationUri required? #5268

cartmanez opened this issue Dec 2, 2019 · 4 comments · Fixed by #5784
Assignees
Labels
@aws-cdk/aws-glue Related to AWS Glue guidance Question that needs advice or information. in-progress This issue is being actively worked on.

Comments

@cartmanez
Copy link

The Question

Hi!

I tried creating glue database and noticed that if I don't specify locationUri, CDK creates one for me by creating an S3 bucket.
Here's the source code

Just wondering, was that that intentional? Location URI is not a required parameter in Cloudformation - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-locationuri .

Environment

  • CDK CLI Version: 1.18.0
  • Module Version: 1.18.0
  • OS: GNU/Linux
  • Language: TypeScript
@cartmanez cartmanez added the needs-triage This issue or PR still needs to be triaged. label Dec 2, 2019
@SomayaB SomayaB added @aws-cdk/aws-glue Related to AWS Glue guidance Question that needs advice or information. labels Dec 2, 2019
@skinny85
Copy link
Contributor

skinny85 commented Dec 2, 2019

That's a good question!

@sam-goodwin (who is the author of this library), can you chime in on this one? Thanks!

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Dec 2, 2019
@machielg
Copy link

machielg commented Dec 17, 2019

A database without a location is valid. Always creating or expecting a bucket uri is not desired behavior IMO.

My current workaround is to specify a blank but not empty string as location
{databaseName: "mydb", locationUri: ' '})

Perhaps the uriLocation should be of "enum | string" type. The default should be no location.

Enum values:
CREATE_BUCKET
NONE

@sam-goodwin
Copy link
Contributor

I have vague memories of running into problems with no location but it's very possible I was doing something else wrong. I agree, if we can default to no location then we should do that. The forced bucket is a total nuisance.

melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 13, 2020
Do not create an s3 bucket by default.
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 13, 2020
Do not create an s3 bucket by default.
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 13, 2020
Do not create an s3 bucket by default.
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jan 13, 2020
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 14, 2020
Do not create an s3 bucket by default.
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 14, 2020
Do not create an s3 bucket by default.
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 22, 2020
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 23, 2020
Remove mentions about creating s3 bucket by default in glue database from readme and jsdoc
melgenek pushed a commit to melgenek/aws-cdk that referenced this issue Jan 23, 2020
@mergify mergify bot closed this as completed in #5784 Jan 24, 2020
mergify bot added a commit that referenced this issue Jan 24, 2020
* fix(glue): Make Glue Database locationUri optional. (#5268)

Do not create an s3 bucket by default.

* fix(glue): Make Glue Database locationUri optional. (#5268)

Add trailing commas

* Validate locationUri (#5268).

Remove mentions about creating s3 bucket by default in glue database from readme and jsdoc

* Add default jsdoc to Glue:Database locationUri (#5268).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@andreanerla
Copy link

I'm having problems because of no URI db locations, see link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-glue Related to AWS Glue guidance Question that needs advice or information. in-progress This issue is being actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants