Configuring, Using, and Auditing VM Service Accounts and Scopes Reviews

15898 reviews

Dharmeshkumar B. · Reviewed about 6 years ago

Joni L. · Reviewed about 6 years ago

Paul S. · Reviewed about 6 years ago

David S. · Reviewed about 6 years ago

Shuk Dev S. · Reviewed about 6 years ago

Pranav V. · Reviewed about 6 years ago

Gerrit J. · Reviewed about 6 years ago

Patrick L. · Reviewed about 6 years ago

Rajender R. · Reviewed about 6 years ago

Steven A. · Reviewed about 6 years ago

Mustakim D. · Reviewed about 6 years ago

Oluwashina A. · Reviewed about 6 years ago

Hans K. · Reviewed about 6 years ago

Danut B. · Reviewed about 6 years ago

Vinodh N. · Reviewed about 6 years ago

:)

Michał T. · Reviewed about 6 years ago

Pavel L. · Reviewed about 6 years ago

Richard S. · Reviewed about 6 years ago

Francisco Jose V. · Reviewed about 6 years ago

Andrew C. · Reviewed about 6 years ago

Very good lab, thanks!!

Erick L. · Reviewed about 6 years ago

Update. The lab worked correctly after retrying. Previous response below. =========== There's a bug somewhere in some SDK file or the python script in the lab. Maybe in query.py. All the installs of the necessary libraries went fine. I tried the lab twice and got the same error when running the script. Pasted below. ==== udent-00-1d9467e11962@bigquery-instance:~$ student-00-1d9467e11962@bigquery-instance:~$ python3 query.py Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/credentials.py", line 96, in refresh self._retrieve_info(request) File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/credentials.py", line 77, in _retrieve_in fo request, service_account=self._service_account_email File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/_metadata.py", line 200, in get_service_a ccount_info recursive=True, File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/_metadata.py", line 153, in get response, google.auth.exceptions.TransportError: ('Failed to retrieve http://metadata.google.internal/computeMetadata/v1/inst ance/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true from th e Google Compute Enginemetadata service. Status: 404 Response:\nb\'<!DOCTYPE html>\\n<html lang=en>\\n <meta chars et=utf-8>\\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\\n <title>Error 404 (Not Found)!!1</title>\\n <style>\\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{ba ckground:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11p x 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){bod y{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/brandin g/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:19 2dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding /googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-blo ck;height:54px;width:150px}\\n </style>\\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\ \n <p><b>404.</b> <ins>That\\xe2\\x80\\x99s an error.</ins>\\n <p>The requested URL <code>/computeMetadata/v1/ins tance/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true</code> was not found on this server. <ins>That\\xe2\\x80\\x99s all we know.</ins>\\n\'', <google.auth.transport.requests ._Response object at 0x7fe43096e8d0>) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "query.py", line 23, in <module> print(client.query(query).to_dataframe()) File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/client.py", line 2156, in query query_job._begin(retry=retry) File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/job.py", line 3087, in _begin super(QueryJob, self)._begin(client=client, retry=retry) File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/job.py", line 631, in _begin retry, method="POST", path=path, data=self.to_api_repr() File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/client.py", line 487, in _call_api return call() File "/usr/local/lib/python3.5/dist-packages/google/api_core/retry.py", line 286, in retry_wrapped_func on_error=on_error, File "/usr/local/lib/python3.5/dist-packages/google/api_core/retry.py", line 184, in retry_target return target() File "/usr/local/lib/python3.5/dist-packages/google/cloud/_http.py", line 417, in api_request timeout=timeout, File "/usr/local/lib/python3.5/dist-packages/google/cloud/_http.py", line 275, in _make_request method, url, headers, data, target_object, timeout=timeout File "/usr/local/lib/python3.5/dist-packages/google/cloud/_http.py", line 313, in _do_request url=url, method=method, headers=headers, data=data, timeout=timeout File "/usr/local/lib/python3.5/dist-packages/google/auth/transport/requests.py", line 277, in request self.credentials.before_request(auth_request, method, url, request_headers) File "/usr/local/lib/python3.5/dist-packages/google/auth/credentials.py", line 124, in before_request self.refresh(request) File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/credentials.py", line 102, in refresh six.raise_from(new_exc, caught_exc) File "<string>", line 3, in raise_from google.auth.exceptions.RefreshError: ('Failed to retrieve http://metadata.google.internal/computeMetadata/v1/instan ce/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true from the Google Compute Enginemetadata service. Status: 404 Response:\nb\'<!DOCTYPE html>\\n<html lang=en>\\n <meta charset =utf-8>\\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\\n <title>Error 40 4 (Not Found)!!1</title>\\n <style>\\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{back ground:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{ background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/ googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192d pi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0 }}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/g ooglelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block ;height:54px;width:150px}\\n </style>\\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\\n <p><b>404.</b> <ins>That\\xe2\\x80\\x99s an error.</ins>\\n <p>The requested URL <code>/computeMetadata/v1/insta nce/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true</code> w as not found on this server. <ins>That\\xe2\\x80\\x99s all we know.</ins>\\n\'', <google.auth.transport.requests._ Response object at 0x7fe43096e8d0>) student-00-1d9467e11962@bigquery-instance:~$

Khaja A. · Reviewed about 6 years ago

There's a bug somewhere in some SDK file or the python script in the lab. Maybe in query.py. All the installs of the necessary libraries went fine. I tried the lab twice and got the same error when running the script. Pasted below. ==== udent-00-1d9467e11962@bigquery-instance:~$ student-00-1d9467e11962@bigquery-instance:~$ python3 query.py Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/credentials.py", line 96, in refresh self._retrieve_info(request) File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/credentials.py", line 77, in _retrieve_in fo request, service_account=self._service_account_email File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/_metadata.py", line 200, in get_service_a ccount_info recursive=True, File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/_metadata.py", line 153, in get response, google.auth.exceptions.TransportError: ('Failed to retrieve http://metadata.google.internal/computeMetadata/v1/inst ance/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true from th e Google Compute Enginemetadata service. Status: 404 Response:\nb\'<!DOCTYPE html>\\n<html lang=en>\\n <meta chars et=utf-8>\\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\\n <title>Error 404 (Not Found)!!1</title>\\n <style>\\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{ba ckground:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11p x 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){bod y{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/brandin g/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:19 2dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding /googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-blo ck;height:54px;width:150px}\\n </style>\\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\ \n <p><b>404.</b> <ins>That\\xe2\\x80\\x99s an error.</ins>\\n <p>The requested URL <code>/computeMetadata/v1/ins tance/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true</code> was not found on this server. <ins>That\\xe2\\x80\\x99s all we know.</ins>\\n\'', <google.auth.transport.requests ._Response object at 0x7fe43096e8d0>) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "query.py", line 23, in <module> print(client.query(query).to_dataframe()) File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/client.py", line 2156, in query query_job._begin(retry=retry) File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/job.py", line 3087, in _begin super(QueryJob, self)._begin(client=client, retry=retry) File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/job.py", line 631, in _begin retry, method="POST", path=path, data=self.to_api_repr() File "/usr/local/lib/python3.5/dist-packages/google/cloud/bigquery/client.py", line 487, in _call_api return call() File "/usr/local/lib/python3.5/dist-packages/google/api_core/retry.py", line 286, in retry_wrapped_func on_error=on_error, File "/usr/local/lib/python3.5/dist-packages/google/api_core/retry.py", line 184, in retry_target return target() File "/usr/local/lib/python3.5/dist-packages/google/cloud/_http.py", line 417, in api_request timeout=timeout, File "/usr/local/lib/python3.5/dist-packages/google/cloud/_http.py", line 275, in _make_request method, url, headers, data, target_object, timeout=timeout File "/usr/local/lib/python3.5/dist-packages/google/cloud/_http.py", line 313, in _do_request url=url, method=method, headers=headers, data=data, timeout=timeout File "/usr/local/lib/python3.5/dist-packages/google/auth/transport/requests.py", line 277, in request self.credentials.before_request(auth_request, method, url, request_headers) File "/usr/local/lib/python3.5/dist-packages/google/auth/credentials.py", line 124, in before_request self.refresh(request) File "/usr/local/lib/python3.5/dist-packages/google/auth/compute_engine/credentials.py", line 102, in refresh six.raise_from(new_exc, caught_exc) File "<string>", line 3, in raise_from google.auth.exceptions.RefreshError: ('Failed to retrieve http://metadata.google.internal/computeMetadata/v1/instan ce/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true from the Google Compute Enginemetadata service. Status: 404 Response:\nb\'<!DOCTYPE html>\\n<html lang=en>\\n <meta charset =utf-8>\\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\\n <title>Error 40 4 (Not Found)!!1</title>\\n <style>\\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{back ground:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{ background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/ googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192d pi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0 }}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/g ooglelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block ;height:54px;width:150px}\\n </style>\\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\\n <p><b>404.</b> <ins>That\\xe2\\x80\\x99s an error.</ins>\\n <p>The requested URL <code>/computeMetadata/v1/insta nce/service-accounts/bigquery-qwiklab@qwiklabs-gcp-00-2946a84b5e30.iam.gserviceaccount.com/?recursive=true</code> w as not found on this server. <ins>That\\xe2\\x80\\x99s all we know.</ins>\\n\'', <google.auth.transport.requests._ Response object at 0x7fe43096e8d0>) student-00-1d9467e11962@bigquery-instance:~$

Khaja A. · Reviewed about 6 years ago

there was a permissions glitch and I had to re-start. Possibly because I left the parent tab open over the weekend before clicking Start Lab.

Erik L. · Reviewed about 6 years ago

Michael H. · Reviewed about 6 years ago

We do not ensure the published reviews originate from consumers who have purchased or used the products. Reviews are not verified by Google.