C4w4 :Assignment 4: Capstone Project Part 1 - ETL and Data Modeling: VSCode UI terminated with error code 1

1)VSCode UI : this page gets getting disconnected while doing the assignment , and then need to do the whole process again, as the Jupyter instance created using it , also needs to be created again .
2)So when trying the whole process again the Jupyter notebook does not open and have to follow the steps mentioned as alternative using cloud shell :
in there getting below issue :
~ nano -c restart_vscode_service.sh ~ bash restart_vscode_service.sh
restart_vscode_service.sh: line 1: nstance: command not found
~ ls restart_vscode_service.sh ~ bash restart_vscode_service.sh
restart_vscode_service.sh: line 1: nstance: command not found

in order to redo , started the lab again , now unable to login to AWS , below is the error when i click on AWS link : The credentials in your login link were invalid. Please contact your administrator.

[quote=“ami_il, post:1, topic:770019, full:true”]
1)VSCode UI : this page gets getting disconnected while doing the assignment has alreday happened 3 times, and then need to do the whole process again, as the Jupyter instance created using it , also needs to be created again .
2)So when trying the whole process again the Jupyter notebook does not open and have to follow the steps mentioned as alternative using cloud shell :
in there getting below issue :
~ nano -c restart_vscode_service.sh ~ bash restart_vscode_service.sh
restart_vscode_service.sh: line 1: nstance: command not found
~ ls restart_vscode_service.sh ~ bash restart_vscode_service.sh
restart_vscode_service.sh: line 1: nstance: command not found

Still looking for what works best


this is the 4th time I got the same issue as I am trying to complete the assignment , the VSCode UI just terminated withthe above attached error

Hello @ami_il
Sorry for the inconvenience. There is a problem with the command you run before the terminal crashes. In order to find the source of the problem, you can record a screen cast before running the command, and see the video right before the terminal closes.

Hi,
Thank you for your response. The issue arises during the second Terraform execution. When I run terraform init , plan , and apply for the first time (which handles fetching data from the API and storing it in S3), everything works without any problems. However, when I run terraform init again for the transformation phase, that’s when I encounter the error mentioned earlier.

@ami_il Please, try the solution hereunder to find out what the problem might be with the command you are running.

on following the mentioned steps the error it showed is "│ Error: Failed to install provider

│ Error while installing hashicorp/aws v5.87.0: write /tmp/terraform-provider1811085047: no space left on device

Steps followed are as below : Running cd to terraform

Running terraform init , for the extract load

Received the error as below

As suggested did view>terminal> once the terminal opened , trying cd terraform .

Inside terraform folder , trying the terraform init again

on following the mentioned steps the error it showed is "│ Error: Failed to install provider

│ Error while installing hashicorp/aws v5.87.0: write /tmp/terraform-provider1811085047: no space left on device

Running cd to terraform

Running terraform init , for the extract load
image

Received the error as below

As suggested did view>terminal> once the terminal opened , trying cd terraform .

Inside terraform folder , trying the terraform init again

error recieved on screen

also tried to run the df-h command

now new issue , after error when I try to follow the mentioned steps, ie view > terminal , and execute the command again which gave error , getting below error , pls help , have been trying for more than 10 days to finish this assignment

Also created the errors.txt file, also we used to have a s3.tf file in the terraform/modules/extract_jobs/s3.tf , which is no longer available , pls help

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 15, in resource “aws_glue_connection” “rds_connection”:
15: availability_zone = data.aws_subnet.private_a.availability_zone

A data resource “aws_subnet” “private_a” has not been declared in
module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 17, in resource “aws_glue_connection” “rds_connection”:
17: subnet_id = data.aws_subnet.private_a.id

A data resource “aws_subnet” “private_a” has not been declared in
module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 60, in resource “aws_glue_job” “api_users_ingestion_etl_job”:
60: script_location = “s3://{aws_s3_bucket.scripts.id}/{aws_s3_object.glue_job_extract_api.id}”

A managed resource “aws_s3_bucket” “scripts” has not been declared in
module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 60, in resource “aws_glue_job” “api_users_ingestion_etl_job”:
60: script_location = “s3://{aws_s3_bucket.scripts.id}/{aws_s3_object.glue_job_extract_api.id}”

A managed resource “aws_s3_object” “glue_job_extract_api” has not been
declared in module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 75, in resource “aws_glue_job” “api_users_ingestion_etl_job”:
75: “–target_path” = “s3://${data.aws_s3_bucket.data_lake.bucket}/landing_zone/api/users”

A data resource “aws_s3_bucket” “data_lake” has not been declared in
module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 93, in resource “aws_glue_job” “api_sessions_ingestion_etl_job”:
93: script_location = “s3://{aws_s3_bucket.scripts.id}/{aws_s3_object.glue_job_extract_api.id}”

A managed resource “aws_s3_bucket” “scripts” has not been declared in
module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 93, in resource “aws_glue_job” “api_sessions_ingestion_etl_job”:
93: script_location = “s3://{aws_s3_bucket.scripts.id}/{aws_s3_object.glue_job_extract_api.id}”

A managed resource “aws_s3_object” “glue_job_extract_api” has not been
declared in module.extract_job.

Error: Reference to undeclared resource

on modules/extract_job/glue.tf line 108, in resource “aws_glue_job” “api_sessions_ingestion_etl_job”:
108: “–target_path” = “s3://${data.aws_s3_bucket.data_lake.bucket}/landing_zone/api/sessions”

A data resource “aws_s3_bucket” “data_lake” has not been declared in
module.extract_job.

In the error it is looking for a module / file
module.extract_job.

Hello @ami_il
Seems like your environment has been broken. Files has been deleted and the space is full. The best way to resolve this is to do a lab refresh. Please, fill out this form.

Hi Amir ,
Thanks for responding , will go ahead and submit the form

Submitted the form and got email that it has been resolved , but still getting error exit code 1 , after following the specified steps , to find the exact error and creating the errors.txt file below is the error

Error: No configuration files

Apply requires configuration to be present. Applying without a configuration
would mark everything for destruction, which is normally not what is desired.
If you would like to destroy everything, run ‘terraform destroy’ instead.

@ami_il the problem is probably stemming from the fact that you hadn’t run source scripts/setup.sh in the beginning of the lab. Make sure that you are working in the same terminal instance where you run this command.