Courseiva
Continuous Improvement for Existing SolutionshardMultiple ChoiceObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company uses AWS CloudFormation to manage infrastructure. The stack fails to update with the error: 'Resource handler returned message: The subnet 'subnet-xxx' is in use by a network interface.' The subnet is associated with a Lambda function in a VPC. The CloudFormation template is trying to delete the subnet. What should the company do to resolve this?

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

Update the Lambda function configuration to remove the VPC settings, then delete the subnet.

To delete a subnet that is in use by a Lambda function's ENI, you must first disassociate the ENI. This can be done by updating the Lambda function configuration to remove the VPC settings, which causes Lambda to delete the ENI. After the ENI is deleted, you can delete the subnet. Option B is incorrect because the DeletionPolicy attribute only handles deletion, not update failures, and the subnet is still in use. Option C is incorrect because there is no force delete option for subnets; dependencies must be resolved first. Option D is incorrect because ENIs managed by Lambda cannot be manually deleted; you must update or delete the Lambda function.

Answer analysis

Option-by-option breakdown

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

  • Update the Lambda function configuration to remove the VPC settings, then delete the subnet.

    Why this is correct

    This releases the ENI, allowing subnet deletion.

  • Modify the CloudFormation template to ignore the deletion failure using a DeletionPolicy attribute.

    Why it's wrong here

    DeletionPolicy can retain resources but does not resolve the dependency.

  • Use the AWS CLI to force delete the subnet.

    Why it's wrong here

    Subnet cannot be force deleted if in use.

  • Manually delete the Elastic Network Interface (ENI) from the AWS Management Console.

    Why it's wrong here

    ENI is managed by Lambda and cannot be manually deleted while in use.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 practice question is part of Courseiva's free Amazon Web Services 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 SAP-C02 exam.