Week 2 Graded Lab

when I tried to ‘terraform apply’ last week many times, it still shows database already exist and some of the answer in the community was the technical staff takes around a week to clean everything for the environment. And one week later, when I finished rest of weeks all labs, I backed this one still same issue. I followed by instruction step by step and when finally I tried to run this command ‘terraform apply’ and type yes then crashed the terminal. And I tried to open again do it all again, then the error came again. I checked aws glue but it also has nothing there.

This is very frustrating as I’m stuck in this lab to going to new course. The rest of weeks is no problem at all as long as follow every details in documentation.

Error as below

aws_glue_catalog_database.analytics_database: Creating…

│ Error: creating Glue Catalog Database (de-c1w2-analytics-db): operation error Glue: CreateDatabase, https response error StatusCode: 400, RequestID: dc004029-77ef-4ec8-98c3-5bfd1667063a, AlreadyExistsException: Database already exists.

│ with aws_glue_catalog_database.analytics_database,
│ on glue.tf line 1, in resource “aws_glue_catalog_database” “analytics_database”:
│ 1: resource “aws_glue_catalog_database” “analytics_database” {


voclabs:~/environment/infrastructure/terraform $ aws glue start-job-run --job-name de-c1w2-etl-job | jq -r ‘.JobRunId’

An error occurred (EntityNotFoundException) when calling the StartJobRun operation: Failed to start job run due to missing metadata.
voclabs:~/environment/infrastructure/terraform $

I attempted to delete the existing database, but I was informed that I do not have sufficient permissions to perform this action.

Hello @dear-mark, sorry for the inconvenience and the issue you are facing. Unfortunately since it happened a week ago to others as well. Did you fill that form so the engineers team can refresh your lab. Since the terminal crashed with that command could you wait for a new lab session see if it continues. You might need to wait after the weekend to be contacted by @esanina . Thanks and hope it helps

I have been experiencing a similar issue (shared a screenshot below) after running “terraform apply”.

The task of creating resources never gets completed and the subsequent steps (i.e. creating a glue job) throw errors.

Hello @parth1811,
It seems that after running terraform apply does not create the glue job. Could you try with a new instance and if that doesn’t fix it, could you wait for a new lab session. Thanks

I tried doing both but the problem still persists. FYI: I filled out the form to refresh my lab 4 days ago.
Attached is the latest screenshot of the error.

Hello @parth1811,
Yes I could reproduce the same error after terraform apply as well:


Maybe a staff @esanina, could manualy refresh your lab, FYI it takes 2-3 days for the refresh to happen after you fill the form. Thanks for your patience

Hi Georgios

After 5 days I tried still same problem and I’ve just submitted form you mentioned.

Error as below:

Do you want to perform these actions?
Terraform will perform the actions described above.
Only ‘yes’ will be accepted to approve.

Enter a value: yes

aws_glue_connection.rds_connection: Creating…
aws_glue_catalog_database.analytics_database: Creating…
aws_s3_bucket.scripts: Creating…
aws_iam_role.glue_role: Creating…
aws_s3_bucket.data_lake: Creating…
aws_iam_role.glue_role: Creation complete after 0s [id=Cloud9-de-c1w2-glue-role]
aws_iam_role_policy.task_role_policy: Creating…
aws_glue_connection.rds_connection: Creation complete after 0s [id=471112962084:de-c1w2-rds-connection]
aws_s3_bucket.scripts: Creation complete after 0s [id=de-c1w2-scripts-471112962084-20241219152154571600000001]
aws_s3_bucket_public_access_block.scripts: Creating…
aws_s3_object.glue_job_script: Creating…
aws_s3_bucket.data_lake: Creation complete after 0s [id=de-c1w2-datalake-471112962084-20241219152154609300000002]
aws_iam_role_policy.task_role_policy: Creation complete after 0s [id=Cloud9-de-c1w2-glue-role:de-c1w2-glue-role-policy]
aws_s3_bucket_public_access_block.data_lake: Creating…
aws_s3_bucket_public_access_block.data_lake: Creation complete after 0s [id=de-c1w2-datalake-471112962084-20241219152154609300000002]
aws_s3_bucket_public_access_block.scripts: Creation complete after 0s [id=de-c1w2-scripts-471112962084-20241219152154571600000001]
aws_s3_object.glue_job_script: Creation complete after 0s [id=glue_job.py]

│ Error: creating Glue Catalog Database (de-c1w2-analytics-db): operation error Glue: CreateDatabase, https response error StatusCode: 400, RequestID: 9b530077-f2e9-4c05-99f9-7285f8146ab6, AlreadyExistsException: Database already exists.

Hello @dear-mark,
Sorry about the inconvenience and hopefully the issue will be resolved soon. Did you submit that form the previous week when you got that output or today? Since you said you’ve just submitted it should be able for a staff to refresh your lab @esanina. Thanks