Courseiva
Question 105 of 823
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

Configuring Automatic Slot Swap with Warm-Up in Azure Pipelines

Your team uses Azure Pipelines to deploy a web app to Azure App Service. The deployment uses the 'AzureWebApp@1' task with a deployment slot. You need to ensure that after a successful deployment to the staging slot, the slot swap happens automatically and the staging slot is warmed up before the swap. Which configuration should you use?

Quick Answer

Setting the Slot parameter to staging and enabling 'Swap with production' inside the AzureWebApp@1 task is what triggers an automatic swap the moment deployment to staging finishes — and Azure respects the target slot's warm-up phase during that swap, so production only receives a fully initialized app rather than a cold-started one.

⚠ Common exam trap

Candidates often think a separate swap task or CLI command is required for slot swapping, but the 'AzureWebApp@1' task's built-in 'Swap with production' option handles both deployment and warm-up automatically, making it the simplest and most reliable choice.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Set the 'Slot' parameter to 'staging' and enable 'Swap with production' in the task.

The 'AzureWebApp@1' task includes a 'Swap with production' checkbox that, when enabled, automatically performs a slot swap after the deployment to the specified slot (e.g., staging) completes. This ensures the staging slot is warmed up by the deployment process before the swap, as the swap operation respects the warm-up phase of the target slot, preventing downtime and ensuring the production slot receives a fully initialized application.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use the 'Azure App Service manage' task to swap slots after deployment.

    Why it's wrong here

    This is a manual step, not automatic.

  • Set the 'Slot' parameter to 'staging' and enable 'Swap with production' in the task.

    Why this is correct

    This automatically swaps after deployment with warmup.

  • Use the 'Azure CLI' task to run 'az webapp deployment slot swap' after deployment.

    Why it's wrong here

    This is manual and does not automatically warm up.

  • Configure the deployment task to deploy to staging and then use a separate task to swap.

    Why it's wrong here

    This requires an additional task, not automatic.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on AZ-400

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Your release pipeline deploys to Azure App Service using slots. You need to ensure that after swapping, the warmup request is sent to the production slot before traffic is fully routed. What should you configure?

hard
  • A.Enable auto swap for the deployment slot and configure a custom warmup path.
  • B.Add a health check to the App Service.
  • C.Perform a manual swap and then send a warmup request via a script.
  • D.Configure slot-specific app settings to enable warmup.

Why A: Enabling auto swap with a custom warmup path sends a warmup request to the target slot before the swap completes, ensuring the production slot is warmed up. Option B is incorrect because a health check is used for monitoring instance health, not for warmup before swap. Option C is incorrect because a manual swap does not include automatic warmup; you would need to implement custom logic. Option D is incorrect because slot-specific app settings are sticky and not swapped; they do not enable warmup.

Variation 2. You need to configure a release pipeline that deploys to Azure App Service. The deployment should use the 'slot swap' strategy to minimize downtime. Which deployment slot should you initially deploy to?

easy
  • A.Production slot
  • B.Warmup slot
  • C.Staging slot
  • D.All slots simultaneously

Why C: The slot swap strategy in Azure App Service deploys to a non-production slot (typically 'staging') first, allowing validation before swapping with the production slot. This eliminates downtime by warming up the staging slot and then routing traffic to it via a zero-downtime swap operation. Deploying directly to production would cause downtime or require manual traffic management.

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.