This repository was archived by the owner on Jul 16, 2024. It is now read-only.
This repository was archived by the owner on Jul 16, 2024. It is now read-only.
NotebookPlatform construct potentially building resources ID with tokens #570
Open
Description
The method addUser()
in the NotebookPlatform
construct is using the identity_name
parameter in some resources ID. If the username is a token that is resolved at deploy time, CDK fails.
Here is a typical example that is failing:
notebook_user = iam.User(self, 'NotebookUser', user_name='my-user')
# Notebook to user association
exec_roles = notebook_platform.add_user([ara.NotebookUserOptions(
identity_name=notebook_user.user_name,
notebook_managed_endpoints=[ ara.NotebookManagedEndpointOptions(
emr_on_eks_version= ara.EmrVersion.V6_9,
execution_policy= exec_policy,
managed_endpoint_name="test"
)])
])
Workaround: replace the identity_name
value by the actual name you provide to the User
construct and add a CDK node dependency between them
notebook_user = iam.User(self, 'NotebookUser', user_name='my-user')
# Notebook to user association
exec_roles = notebook_platform.add_user([ara.NotebookUserOptions(
identity_name='my-user',
notebook_managed_endpoints=[ ara.NotebookManagedEndpointOptions(
emr_on_eks_version= ara.EmrVersion.V6_9,
execution_policy= exec_policy,
managed_endpoint_name="test"
)])
])
# Get the Role created by the notebook platform
exec_role=exec_roles[0]
exec_role.node.add_dependency(notebook_user)