Question 479 of 1,733
Design of SAP Workloads on AWSmediumMultiple ChoiceObjective-mapped

Why Does AWS CLI Return Null for Public IP?

This PAS-C01 practice question tests your understanding of design of sap workloads on aws. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Network Topology
$ aws ec2 describe-instancesfilters "Name=instance-typequery "Reservations[0].Instances[0].NetworkInterfaces[0].Association.PublicIp"Refer to the exhibit.null

An SAP administrator runs the above CLI command to find the public IP of an m5.2xlarge instance. The output is null. Which of the following is the most likely reason?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Network Topology
$ aws ec2 describe-instancesfilters "Name=instance-typequery "Reservations[0].Instances[0].NetworkInterfaces[0].Association.PublicIp"Refer to the exhibit.null

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

The instance does not have a public IP address assigned

The CLI command `aws ec2 describe-instances --instance-ids <id> --query 'Reservations[0].Instances[0].PublicIpAddress'` returns null because the instance does not have a public IP address assigned. In AWS, a public IP is only assigned to an instance if it is launched in a subnet that auto-assigns public IPv4 addresses, or if an Elastic IP is attached. The command itself is syntactically correct and will output null (or an empty string) when no public IP exists, not an error.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • The security group blocks the public IP

    Why it's wrong here

    Security groups do not control IP assignment.

  • The CLI command has a syntax error

    Why it's wrong here

    The command syntax is valid.

  • The instance type m5.2xlarge does not support public IP addresses

    Why it's wrong here

    All EC2 instance types can have public IPs if configured.

  • The instance does not have a public IP address assigned

    Why this is correct

    The instance may be in a private subnet or launched without a public IP.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may incorrectly attribute the null output to a security group blocking the IP or a syntax error, rather than understanding that the instance simply lacks a public IP address due to subnet configuration or missing Elastic IP.

Trap categories for this question

  • Command / output trap

    The command syntax is valid.

Detailed technical explanation

How to think about this question

Under the hood, the `PublicIpAddress` field in the EC2 describe-instances response is only present when the instance has a public IPv4 address, which can be auto-assigned at launch (if the subnet's `MapPublicIpOnLaunch` attribute is true) or manually attached via an Elastic IP. If the instance is in a private subnet or the subnet does not have auto-assign public IP enabled, the field is omitted from the response, causing the JMESPath query to return null. This is distinct from an empty string; the AWS CLI's `--query` will output `null` for missing keys.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PAS-C01 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PAS-C01 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PAS-C01 question test?

Design of SAP Workloads on AWS — This question tests Design of SAP Workloads on AWS — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The instance does not have a public IP address assigned — The CLI command `aws ec2 describe-instances --instance-ids <id> --query 'Reservations[0].Instances[0].PublicIpAddress'` returns null because the instance does not have a public IP address assigned. In AWS, a public IP is only assigned to an instance if it is launched in a subnet that auto-assigns public IPv4 addresses, or if an Elastic IP is attached. The command itself is syntactically correct and will output null (or an empty string) when no public IP exists, not an error.

What should I do if I get this PAS-C01 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Keep practising

More PAS-C01 practice questions

Last reviewed: Jul 4, 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 PAS-C01 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 PAS-C01 exam.