Microsoft Certified Azure Developer Associate · Free Practice Question Medium
Question 6
You have deployed an Azure Container Instance (ACI) that requires access to files stored in an Azure Storage Account. What is the best way to set this up to ensure secure and efficient access?
-
A
Create a Shared Access Signature (SAS) token and provide it to the ACI as an environment variable.
-
B
Use Azure CLI commands to copy files from the storage account to the ACI during the startup process.
-
C
Use the storage account's connection string directly in the ACI's environment variables.
-
D
Configure a Managed Identity for the ACI and assign it the necessary permissions to the storage account.
Reveal correct answer
Correct answer: D
A. Creating a Shared Access Signature (SAS) token and providing it to the ACI as an environment variable can be a valid approach for granting access to the storage account. However, SAS tokens have an expiration date and may need to be managed and renewed periodically, which can add complexity to the setup.
B. Using Azure CLI commands to copy files from the storage account to the ACI during the startup process is not the most efficient way to ensure secure and efficient access. This approach may introduce unnecessary complexity and potential security risks, as it involves manual file copying and management during the deployment process.
C. Using the storage account's connection string directly in the ACI's environment variables is not the best practice for ensuring secure access. Storing sensitive information like connection strings in environment variables can pose a security risk as they can be easily exposed.
D. Configuring a Managed Identity for the ACI and assigning it the necessary permissions to the storage account is the best way to ensure secure and efficient access. Managed Identities provide a secure way for resources to authenticate and access other Azure resources without the need for credentials.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
