-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws_cdk.aws_glue.CfnDatabase: Glue Database create table default_permissions error #27016
Comments
Works for me on latest version with the snippet from the docs
Try reinstalling your packages to make sure your library is on the most recent version, that's usually why people see these errors |
|
Describe the bug
We're creating a new Glue Database and we want to use the create_table_default_permissions parameter of the DatabaseInputProperty class constructor as this example:
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_glue/CfnDatabase.html#aws_cdk.aws_glue.CfnDatabase.DatabaseInputProperty.create_table_default_permissions
If we set None (default value) or another value, we always receive and error.
Expected Behavior
New database with empty "create table default permissions"
Current Behavior
Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
init() got an unexpected keyword argument 'create_table_default_permissions'
File "/home/camilo/proyectos/cwp-gai-pan/IaC/.venv/lib/python3.9/site-packages/jsii/_runtime.py", line 118, in call
inst = super(JSIIMeta, cast(JSIIMeta, cls)).call(*args, **kwargs)
File "/home/camilo/proyectos/cwp-gai-pan/IaC/cdk_stack.py", line 178, in _create_glue_database
kb_db =aws_glue.CfnDatabase(self,
File "/home/camilo/proyectos/cwp-gai-pan/IaC/cdk_stack.py", line 207, in build_template
self._kb_db = self._create_glue_database(config)
File "/home/camilo/proyectos/cwp-gai-pan/IaC/app.py", line 14, in
stack.build_template(config)
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
TypeError: init() got an unexpected keyword argument 'create_table_default_permissions'
Reproduction Steps
`
from aws_cdk import aws_glue)
kb_db =aws_glue.CfnDatabase(self,
'kb-gluedb',
catalog_id=self.account,
database_input=aws_glue.CfnDatabase.DatabaseInputProperty(
name=f'{config["projectName"]}_kb'),
create_table_default_permissions = []
)
`
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.94.0 (build 987c329)
Framework Version
No response
Node.js Version
v18.17.0
OS
Ubuntu 20.04.6 LTS
Language
Python
Language Version
3.9.17
Other information
No response
The text was updated successfully, but these errors were encountered: