Free AI-200 practice test: 20 questions
Twenty questions across the four AI-200 skill areas, weighted roughly as the real exam is: five on containers, six on data services, four on connecting services and five on security and monitoring. These are original scenario questions. Read what the requirement actually asks before picking a service.
Develop containerized solutions on Azure
Question 1. A release pipeline must deploy exactly the image that passed testing, even if someone later pushes a new image with the same tag. How should the deployment reference the image?
- A. By the latest tag
- B. By its digest
- C. By a version tag such as v2
- D. By the repository name only
Show answer
Answer: B
A digest identifies one specific image and cannot be moved to another, so the deployment runs exactly what was tested. Tags, including latest and version tags, can be re-pointed by a later push.
Want more questions like this? Full AI-200 practice tests →
Question 2. A containerised web app on App Service needs a database password. The password must not appear in the image, the repository or plain app settings. What should you use?
- A. An ENV instruction in the Dockerfile
- B. A .env file committed next to the Dockerfile
- C. The password typed directly into an app setting
- D. An app setting containing a Key Vault reference, resolved with a managed identity
Show answer
Answer: D
A Key Vault reference in an app setting, resolved with the app’s managed identity, exposes the secret to the container as an environment variable while the value stays in Key Vault. The other options place the secret in the image, the repository or plain configuration.
Want more questions like this? Full AI-200 practice tests →
Question 3. A background worker in Azure Container Apps processes jobs from a Service Bus queue. Jobs arrive in bursts a few times a day. The worker must cost as little as possible between bursts. What should you configure?
- A. A Service Bus scale rule with minimum replicas set to 0
- B. A CPU scale rule with minimum replicas set to 0
- C. A fixed count of three replicas
- D. An HTTP scale rule
Show answer
Answer: A
A Service Bus KEDA scale rule with minimum replicas at zero scales the worker out on queue length and back to zero when idle. CPU rules cannot scale from zero, a fixed replica count runs constantly, and HTTP rules do not see queue messages.
Want more questions like this? Full AI-200 practice tests →
Question 4. You deploy a new image to a Container App. You need the previous version available so you can shift all traffic back to it in seconds if errors rise. Which setting makes this possible?
- A. Single revision mode
- B. A higher maximum replica count
- C. Multiple revision mode with traffic weights
- D. A new Container Apps environment per release
Show answer
Answer: C
Multiple revision mode keeps earlier revisions active, so traffic weights can move back to the previous revision immediately. Single revision mode deactivates the old revision on deployment.
Want more questions like this? Full AI-200 practice tests →
Question 5. A pod in AKS restarts repeatedly and shows CrashLoopBackOff. You need the error the application printed before its last crash. Which command gives it?
- A. kubectl describe service
- B. kubectl logs with the –previous flag
- C. kubectl get nodes
- D. kubectl apply -f with the same manifest
Show answer
Answer: B
kubectl logs with –previous returns output from the previous container instance, which is the one that crashed. Describing the Service shows networking, getting nodes shows cluster health, and applying the manifest again repeats the deployment without explaining the crash.
Want more questions like this? Full AI-200 practice tests →
Develop AI solutions by using Azure data management services
Question 6. An app on Azure Cosmos DB for NoSQL must always read its own writes within a user session, at the lowest RU cost that guarantees this. Which consistency level fits?
- A. Strong
- B. Bounded staleness
- C. Session
- D. Eventual
Show answer
Answer: C
Session consistency guarantees read-your-own-writes within a session and is cheaper than strong or bounded staleness. Eventual consistency does not guarantee a client sees its own writes.
Want more questions like this? Full AI-200 practice tests →
Question 7. New documents in a Cosmos DB container must be embedded and indexed for search within seconds of being written, and the solution must scale across several worker instances. What should you use?
- A. A change feed processor with a lease container
- B. A timer that queries the container every hour
- C. A stored procedure called by the client after each write
- D. A composite index on the timestamp property
Show answer
Answer: A
The change feed processor reads inserts and updates in order and uses a lease container to share the work across instances. A scheduled scan is slow and costly, and neither a stored procedure nor a composite index reacts to new writes.
Want more questions like this? Full AI-200 practice tests →
Question 8. A Cosmos DB container stores 1,536-dimension embeddings for several million documents. Vector queries must be fast at this scale and a small loss of accuracy is acceptable. Which vector index type fits best?
- A. A flat vector index
- B. A range index on the embedding path
- C. No index, relying on VectorDistance alone
- D. A DiskANN vector index
Show answer
Answer: D
DiskANN is designed for large-scale approximate nearest-neighbour search with high performance. A flat index is exact but only supports small dimension counts, and a range index does not support vector search.
Want more questions like this? Full AI-200 practice tests →
Question 9. You must build a vector index in Azure Database for PostgreSQL on a table that is currently empty and will be filled gradually. Which index type can be built now without later needing a rebuild to stay accurate?
- A. IVFFlat
- B. HNSW
- C. A B-tree index on the vector column
- D. A GIN index on the vector column
Show answer
Answer: B
HNSW builds its graph incrementally and can be created on an empty table. IVFFlat calculates its clusters from the data present at build time, so building it on an empty table produces poor results until it is rebuilt.
Want more questions like this? Full AI-200 practice tests →
Question 10. Many short-lived Azure Functions connect to Azure Database for PostgreSQL flexible server. Under load, new connections fail because the server's connection limit is reached. What should you do?
- A. Connect through the built-in PgBouncer connection pooler
- B. Increase the server’s storage size
- C. Add a read replica and send writes to it
- D. Disable the pgvector extension
Show answer
Answer: A
Connection pooling with the built-in PgBouncer lets many client connections share a smaller set of server connections, which is what the connection optimisation objective targets. More storage or a read replica does not reduce connection count, and disabling pgvector is unrelated.
Want more questions like this? Full AI-200 practice tests →
Question 11. A chat app sends many identical or near-identical questions to a language model. You want to return a stored answer when a new question is semantically close to one already answered, with the lowest possible latency. What fits best?
- A. A Redis key set to the exact question text
- B. A PostgreSQL table with an IVFFlat index
- C. An Azure Managed Redis vector index of earlier questions and their answers
- D. A Cosmos DB container with strong consistency
Show answer
Answer: C
A vector index in Azure Managed Redis supports fast similarity lookup of earlier questions, which is the semantic caching pattern. An exact-match key only catches identical text. PostgreSQL and Cosmos DB can do vector search but add latency compared with an in-memory cache for this purpose.
Want more questions like this? Full AI-200 practice tests →
Connect to and consume Azure services
Question 12. Uploaded documents must trigger three independent handlers: virus scanning, thumbnail generation and indexing. Each handler is owned by a different team. What should you use to notify them?
- A. One Service Bus queue shared by the three handlers
- B. Event Grid with one event subscription per handler
- C. Each handler polling the storage account every minute
- D. A Service Bus dead-letter queue
Show answer
Answer: B
Event Grid pushes a notification to each event subscription, so each team’s handler reacts independently to the same event. A single queue gives each message to only one consumer, and polling is slower and wasteful.
Want more questions like this? Full AI-200 practice tests →
Question 13. Messages in a Service Bus session-enabled queue belong to individual customer orders. Messages for the same order must be processed in the order they were sent. What must the sender set on each message?
- A. A time-to-live of one hour
- B. A correlation filter value
- C. A duplicate detection window
- D. A session ID equal to the order ID
Show answer
Answer: D
With sessions enabled, messages sharing a session ID are delivered in order to one receiver at a time. Time-to-live, a correlation filter and duplicate detection do not provide ordered delivery.
Want more questions like this? Full AI-200 practice tests →
Question 14. An HTTP-triggered Azure Function exposes an internal API. Callers must present a key, but you do not want to give them the host master key. Which authorisation level should the trigger use?
- A. function
- B. anonymous
- C. admin
- D. system
Show answer
Answer: A
The function authorisation level requires a function-specific or host key, without handing out the master key. Anonymous requires no key, and admin requires the master key.
Want more questions like this? Full AI-200 practice tests →
Question 15. An Azure Function must scale to zero when idle and scale out quickly under load, and you only want to pay for what runs. Which hosting option fits?
- A. A Dedicated App Service plan
- B. The Premium plan with two pre-warmed instances
- C. The Flex Consumption plan
- D. A Kubernetes cluster sized for peak load
Show answer
Answer: C
Flex Consumption scales to zero and bills per execution while scaling out quickly. A Dedicated plan runs continuously on paid capacity, and Premium keeps pre-warmed instances that you pay for while idle.
Want more questions like this? Full AI-200 practice tests →
Secure, monitor, and troubleshoot Azure solutions
Question 16. A Python app on Azure Container Apps must read secrets from Key Vault. No credential may be stored in code, configuration or the image. What should the code use?
- A. A service principal client secret in an environment variable
- B. DefaultAzureCredential with a managed identity that has a Key Vault role
- C. A connection string stored in App Configuration
- D. A shared key embedded in the image
Show answer
Answer: B
DefaultAzureCredential picks up the app’s managed identity at runtime, which needs no stored credential. A client secret, a connection string with a key, or a vault access key are all stored credentials.
Want more questions like this? Full AI-200 practice tests →
Question 17. A secret was deleted from Key Vault by mistake an hour ago. Soft delete is enabled. How do you get it back?
- A. Purge the secret, then recreate it
- B. Restore the entire vault from a backup
- C. Recover the soft-deleted secret
- D. Create a new secret with a new value
Show answer
Answer: C
With soft delete, a deleted secret is retained for the retention period and can be recovered directly. Purging removes it permanently, and there is no need to restore from a backup or recreate it with a new value.
Want more questions like this? Full AI-200 practice tests →
Question 18. Three environments (dev, test and prod) read the same configuration keys with different values from one Azure App Configuration store. How should you organise the values?
- A. Use the same keys with a label per environment
- B. Use a different key name for each environment
- C. Store each value as a feature flag
- D. Put all values in Key Vault instead
Show answer
Answer: A
Labels let the same key hold different values per environment, and each app filters by its own label. Separate key names per environment make code environment-aware, and feature flags are for toggling features rather than storing values.
Want more questions like this? Full AI-200 practice tests →
Question 19. You add OpenTelemetry to an API but see no data in Application Insights. The API runs in Python. What is the most direct way to send traces, metrics and logs there?
- A. Enable diagnostic settings on the resource group
- B. Increase the application’s log level to debug
- C. Set a higher sampling rate
- D. Use the Azure Monitor OpenTelemetry distro with configure_azure_monitor and the connection string
Show answer
Answer: D
The Azure Monitor OpenTelemetry distro, configured with configure_azure_monitor and the Application Insights connection string, exports all three signals to Application Insights. Diagnostic settings do not capture in-app telemetry, and increasing log verbosity or sampling does not create an exporter.
Want more questions like this? Full AI-200 practice tests →
Question 20. You need the number of failed requests per hour over the last 24 hours, charted over time, from Application Insights. Which KQL fits?
- A. requests | summarize count() by resultCode
- B. requests | where timestamp > ago(24h) and success == false | summarize count() by bin(timestamp, 1h) | render timechart
- C. requests | where success == false | top 24 by timestamp
- D. requests | where timestamp > ago(24h) | summarize avg(duration) by bin(timestamp, 1h)
Show answer
Answer: B
Filter the time window and failures, count per one-hour bin and render a time chart. The other options skip the failure filter, the time bins or the chart.
Want more questions like this? Full AI-200 practice tests →
How did you do?
Sixteen or more correct suggests you are close. Below fourteen, the domain guides in this section are the fastest way to find the gaps. Questions 6–11 cover the data domain: if you missed more than two of them, spend your next study week on data management services, because that is where AI-200 differs most from anything you studied before.