0
0
Azurecloud~20 mins

Azure Container Instances (ACI) for simple runs - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ACI Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding ACI container restart behavior

You deploy an Azure Container Instance (ACI) with a container that runs a script and then exits. What will happen to the container after the script finishes?

AThe container will stop and remain in a stopped state.
BThe container will pause and wait for manual restart.
CThe container will be deleted automatically after the script finishes.
DThe container will restart automatically and run the script again.
Attempts:
2 left
💡 Hint

Think about the default restart policy of ACI containers.

Configuration
intermediate
2:00remaining
Specifying CPU and memory for an ACI container

You want to deploy an Azure Container Instance with 2 CPUs and 3.5 GB of memory. Which of the following Azure CLI commands correctly specifies these resources?

Aaz container create --resource-group myGroup --name myContainer --image myImage --cpu 2 --memory 3.5GB
Baz container create --resource-group myGroup --name myContainer --image myImage --cpu 2 --memory 3.5
Caz container create --resource-group myGroup --name myContainer --image myImage --cpu-count 2 --memory 3.5
Daz container create --resource-group myGroup --name myContainer --image myImage --cpu 2 --memory 3.5g
Attempts:
2 left
💡 Hint

Check the official Azure CLI parameter names for CPU and memory.

Architecture
advanced
2:00remaining
Choosing ACI for batch job architecture

You need to run a batch job that processes files uploaded to Azure Blob Storage. The job runs for about 10 minutes per file and should scale automatically based on the number of files. Which architecture best uses Azure Container Instances?

AUse an Azure Function triggered by Blob Storage events to start a new ACI container for each file.
BDeploy a single ACI container that polls Blob Storage every minute and processes all files sequentially.
CUse Azure Logic Apps to run the batch job inside a single ACI container on a schedule.
DDeploy multiple ACI containers manually and assign files to each container by hand.
Attempts:
2 left
💡 Hint

Think about event-driven scaling and automation.

security
advanced
2:00remaining
Securing environment variables in ACI

You want to pass sensitive data like API keys to your Azure Container Instance securely. Which method is the best practice to provide these secrets to the container?

APass secrets as plain text environment variables in the container definition.
BSend secrets as command-line arguments when starting the container.
CStore secrets in Azure Key Vault and reference them in the container environment variables using managed identities.
DHardcode secrets inside the container image before deployment.
Attempts:
2 left
💡 Hint

Consider secure secret storage and access methods in Azure.

Best Practice
expert
2:00remaining
Optimizing cost for short-lived ACI containers

You run many short-lived containers in Azure Container Instances that complete tasks in under 5 minutes. What is the best practice to minimize cost while ensuring fast startup?

AUse large CPU and memory sizes to reduce runtime, even if it increases per-second cost.
BUse Azure Container Apps instead of ACI for better cost optimization on short tasks.
CUse the smallest CPU and memory sizes possible to reduce per-second cost, accepting longer runtimes.
DPre-warm containers by keeping them running idle to avoid startup delays.
Attempts:
2 left
💡 Hint

Think about balancing startup time and billing granularity.