Google Associate Cloud Engineer Question 346
Select 4Google Cloud PlatformAs an Associate Cloud Engineer, you need to create a new service account for a web application that requires access to Google Cloud Storage and Pub/Sub. Which steps should you perform to ensure the service account is properly set up with the necessary permissions?
- A
A. Navigate to the IAM & Admin section in the Google Cloud Console and create a new service account.
- B
B. Assign the 'Storage Object Viewer' role to the service account for the required Cloud Storage bucket.
- C
C. Enable the Pub/Sub API in your project.
- D
D. Assign the 'Pub/Sub Publisher' role to the service account for the required Pub/Sub topic.
- E
E. Add the service account key file to your web application.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To set up a service account with the necessary permissions, you must create the service account, assign the appropriate IAM roles to grant access to required resources, and integrate the service account key file into your application. Enabling the Pub/Sub API is a necessary step for using Pub/Sub services, but it is not directly part of the service account creation process.
- A. Correct.
A. This is the first step in creating a service account, which is required to grant programmatic access to Google Cloud resources.
- B. Correct.
B. Assigning the 'Storage Object Viewer' role is necessary to allow the service account to read objects from the specified Cloud Storage bucket.
- C. Incorrect.
C. Enabling the Pub/Sub API is not directly related to service account creation, but is necessary to use Pub/Sub services in general.
- D. Correct.
D. Assigning the 'Pub/Sub Publisher' role is necessary to allow the service account to publish messages to the specified Pub/Sub topic.
- E. Correct.
E. The service account key file must be integrated into your application to authenticate and authorize API requests using the service account.