Courseiva
Accelerate Workload Migration and ModernizationmediumMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

Network Topology
query 'Contents[?Size > `1000`].{Key: Keyaws s3api list-objectsbucket my-bucketprefix logs/output jsonRefer to the exhibit.

An S3 bucket contains thousands of objects under the 'logs/' prefix. The above AWS CLI command is run to list objects larger than 1000 bytes. The command returns an empty array, but there are known objects larger than 1000 bytes. What is the most likely reason?

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 command only returns the first 1000 objects due to pagination

The CLI command uses single quotes for the query, which is correct in Linux shells, but the issue is that the `Size` field is a number, and the comparison `Size > 1000` should work. However, the command might be returning an empty array because the bucket has a large number of objects and the API returned only a subset (truncated). The command does not include pagination, so it only returns the first 1000 objects. If the large objects are after the first 1000, they won't appear. Also, the query syntax is correct. The bucket policy or permissions would cause an error, not an empty array.

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 command only returns the first 1000 objects due to pagination

    Why this is correct

    The list-objects API paginates; large objects may be in later pages.

  • The prefix 'logs/' is case-sensitive and should be 'Logs/'

    Why it's wrong here

    Prefix is case-sensitive, but if objects are under 'logs/', it's correct.

  • The command has a syntax error in the JMESPath query

    Why it's wrong here

    The query syntax is valid.

  • The bucket policy does not allow listing objects

    Why it's wrong here

    If listing were denied, the command would return an access denied error.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.