Captstone Project Part 2 - Database already exists (de_c4w4a2_transform_db)

Hi, I’m having the same issue some people is having trying to do terraform apply -target=module.transform_job at the begining of the project.

I tried everything, even waiting for the whole platform to expire after 3 hours and tried again. I applied modules individually, commenting the data_quality part and as a whole, destroying and apply again. Nothing worked.

Somehow terraform doesn’t recognize the db was already created by LakeFormation? of course I cannot see the db to manually delete it and doesn’t allow me to create a new one because is already there.

It is the only issue I had during the whole especialization…
Does anyone have any idea?

Hello

I have currently exactly the same issue with Captstone Project Part 1

I was able to complete Captstone Project Part2

Hello @citadel
Can you please try the following and see if it fixes the issue?
Go to AWS Glue, select Databases from the menu on the left, select the de_c4w4a2_transform_db database, and press delete.

Please, note that I took this screenshot from another lab. So, in your case, the database you need to delete has another name.

No db appear there I’m afraid and I have an error if I try to manually create it (db alreay exists)

Same for me

@citadel that is strange. Can you please fill out this form? I hope the lab refresh fixes this.

1 Like

got any solution for this error ?

Before the form I tried again this morning with the same results but I remembered something that could be the problem. The first time I run terraform apply -target=module.extract_job the VSCode terminal crashes half way through (inconsistent tf state?) The second time I’ve go the “Database already exist”.

What I did after that is to alter the env var TF_VAR_catalog_database=de_c4w4a2_transform_db_2 and run the apply again. The apply finished correctly but the job didn’t:

I’m filling the form to clean the account now.

Hello @citadel
The error is probably because the other parts of the project are programmed to look for the de_c4w4a2_transform_db database. You created a database with another name so the Glue jobs are not able to find it.
I have reported this issue. In the meantime, I hope the lab refresh fixes the problem.

Hi, I’m not sure if they refreshed my account yet but I’ve just tried again and I was able to complete the assigment without issues.

Thanks and I hope the rest of people are able to complete it as well!

1 Like