AWS Certified Developer - Associate (DVA-C03) Exam-style mock test
AWS Certified Developer - Associate (DVA-C03)|अभ्यास परीक्षण
Full explanations
Exam format
Pass line 65%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Development with AWS Services
एक payments टीम API Gateway के पीछे Lambda पर एक REST endpoint चलाती है। एक downstream ledger service कभी-कभी redeploys के दौरान कुछ सेकंड के लिए HTTP 500 लौटाती है। टीम चाहती है कि function ledger पर दबाव डाले बिना transient failures को retry करे। कौन सा retry code सबसे उपयुक्त है?
・ while True:
r = call_ledger()
if r.ok: break
# no delay
गलत। बिना delay के tight loop लोड को बढ़ाता है और outage को और खराब कर सकता है।
・ r = call_ledger(
timeout=900)
return r # just wait longer on a 500
गलत। लंबा timeout 500 से recover नहीं करता; यह बस लंबे समय तक प्रतीक्षा करता है।
・ r = cache.get("ledger")
return r # return the last stale response always
गलत। हर request के लिए stale balance serve करना गलत financial data लौटाता है।
✓ for i in range(5):
r = call_ledger()
if r.ok: break
sleep(2**i + random())
सही। Jitter के साथ exponential backoff retries को spread करता है ताकि transient 500s बिना thundering herd के recover हों।
Explanation
Resilient integrations third parties और downstream services के साथ bounded retries का उपयोग exponential backoff और jitter के साथ करती हैं ताकि transient errors dependency को overload किए बिना recover हों।
Example2 · Security
एक bank customers को private S3 bucket से उनका monthly statement PDF download करने देती है। App को bucket को public बनाए बिना प्रत्येक customer को केवल उनके own object तक temporary direct access देना है। कौन सा SDK call सबसे उपयुक्त है?
・ s3.put_bucket_acl(
Bucket=b, ACL="public-read")
# make all statements public to anyone
गलत। public-read ACL हर customer के statements को किसी को भी expose कर देगा।
✓ url = s3.generate_presigned_url(
"get_object", ExpiresIn=300,
Params={"Bucket": b, "Key": k})
सही। Presigned URL bucket expose किए बिना या keys share किए बिना single object तक time-limited access देता है।
・ iam.create_access_key(
UserName=customer)
# issue long-lived keys per customer here
गलत। Long-lived access keys देना एक severe credential-leak risk है।
・ s3.put_bucket_website(
Bucket=b, WebsiteConfiguration=cfg)
# host the bucket publicly as a site
गलत। Static website hosting objects को publicly reachable बनाती है।
Explanation
Presigned URLs bucket permissions बदले बिना या credentials share किए बिना specific S3 object तक secure, time-limited access देते हैं।
Example3 · Testing and Deployment
एक payments टीम अपनी API को Docker image के रूप में package करती है और इसे AWS Fargate पर rolling update के माध्यम से deploy करना चाहती है बिना manage किए। Image को task definition के लिए तैयार करने का पहला step कौन सा है?
・ aws s3 cp Dockerfile s3://build/ \
&& aws lambda publish-layer-version \
--layer-name api --zip-file fileb://d.zip
गलत। S3 में Dockerfile executable image नहीं है और Lambda layers इसके लिए containers नहीं हैं।
・ aws ec2 create-launch-template \
--launch-template-name api \
--launch-template-data '{"UserData":"image"}'
गलत। Launch-template user data EC2 पर run होता है और यह Fargate का image pull करने का तरीका नहीं है।
✓ docker push \
123.dkr.ecr.us-east-1.amazonaws.com/api:1
# then reference this image in the ECS task def
सही। Image ECR पर push होती है और ECS task definition उस image को reference करती है जिसे Fargate run करता है।
・ aws dynamodb put-item \
--table-name images \
--item '{"img":{"S":"api:1"},"id":{"S":"1"}}'
गलत। DynamoDB items store करता है, runnable container images नहीं।
Explanation
Fargate पर containerized deployment image को Amazon ECR पर push करता है और ECS task definition से reference करता है, जिसे service rolling updates के साथ run और update करती है।
Example4 · Troubleshooting and Optimization
Hospital API पर एक request API Gateway, दो Lambda functions, और DynamoDB को span करती है, और latency spikes को localize करना कठिन है। Team प्रत्येक hop में बिताए गए समय दिखाने वाला end-to-end trace चाहती है। कौन सी AWS service distributed tracing provide करती है?
・Amazon S3 server access logs, जो bucket requests record करते हैं
गलत। S3 access logs bucket requests record करते हैं, cross-service request traces नहीं।
✓AWS X-Ray, प्रत्येक service में tracing enabled के साथ
सही। X-Ray services में requests trace करता है और प्रत्येक segment द्वारा contributed latency दिखाता है।
・AWS Config recorder, जो resource configuration state track करता है
गलत। AWS Config configuration state track करता है, request latency traces नहीं।
・Amazon Athena federated queries, जो S3 में stored data query करती हैं
गलत। Athena S3 में data query करती है लेकिन distributed tracing perform नहीं करती।
Explanation
X-Ray service hops में distributed tracing provide करता है।
Example5 · Development with AWS Services
एक अस्पताल एडमिशन सेवा एक थर्ड-पार्टी eligibility API को कॉल करती है जो पीक लोड के दौरान HTTP 503 लौटाती है। डेवलपर चाहता है कि transient failures को बिना API को अत्यधिक कॉल किए या callers को रोके बिना retry किया जाए। एक resilient integration के लिए कौन सा तरीका सबसे उपयुक्त है?
✓Exponential backoff, jitter और circuit breaker से failures handle करें
सही। Backoff with jitter retries को फैलाता है, और circuit breaker dependency के अस्वस्थ रहते calls बंद करता है।
・Tight loop में तुरंत retry करें जब तक eligibility call सफल न हो
गलत। Tight retry loop एक संघर्षशील dependency पर लोड बढ़ाता है और caller को exhaust कर सकता है।
・एक cached placeholder record लौटाएं और eligibility API को फिर कभी कॉल न करें
गलत। Stale placeholders हमेशा serve करना real integration को छोड़ना और outages छुपाना है।
・Function timeout बढ़ाएं ताकि single blocking call को अधिक समय मिले
गलत। लंबा timeout केवल failure को देरी करता है और transient error pattern को address नहीं करता।
Explanation
लंबे timeouts failure rate कम नहीं करते और न ही dependency की रक्षा करते हैं।
Example6 · Development with AWS Services
एक claims-processing pipeline को बीमा submissions के bursts स्वीकार करने, प्रत्येक को जल्दी acknowledge करने, और बाद में एक worker tier को अपनी गति से process करने देने की आवश्यकता है। कौन सा pattern intake को processing से सबसे सीधे decouple करता है?
・Intake API processor को synchronously invoke करे और result आने तक block करे
गलत। Synchronous call, intake latency को processing time से जोड़ता है और bursts में fail होता है।
・प्रत्येक submission को relational table में store करें और client उस table को बार-बार poll करे
गलत। Table को client polling करना load बढ़ाता है और client को processing progress से जोड़ता है।
✓प्रत्येक submission को Amazon SQS queue पर रखें जिसे worker consumers asynchronously poll करें
सही। SQS queue bursts buffer करती है, intake तेज़ी से acknowledge करती है, और consumers अपनी दर पर work pull कर सकते हैं।
・प्रत्येक submission को हर worker को fan out करें ताकि सभी एक ही item process करें
गलत। हर message को हर worker को fan करना work distribute करने की बजाय duplicate करता है।
Explanation
SQS producers को consumers से buffer करती है ताकि प्रत्येक side स्वतंत्र रूप से scale कर सके।
Example7 · Development with AWS Services
एक रिटेल साइट पर checkout के दौरान, ब्राउज़र कभी-कभी network timeout के बाद create-order call को फिर से try करता है, और shoppers के पास duplicate orders आ जाते हैं। Orders DynamoDB में order_id के साथ partition key के रूप में रहते हैं, और client हर retry पर same order_id भेजता है। कौन सा SDK call order creation को idempotent बनाता है?
・ table.put_item(Item=order)
time.sleep(1)
table.put_item(Item=order) # write twice
गलत। Item को दो बार लिखना overwrite की guarantee देता है और duplicates रोकने में कुछ नहीं करता।
✓ table.put_item(
Item=order,
ConditionExpression=
"attribute_not_exists(order_id)")
सही। यह condition तब write को reject करती है जब order_id पहले से exist करती है, इसलिए retry किया गया request दूसरा order नहीं बना सकता।
・ dups = table.scan()["Items"]
if order not in dups:
table.put_item(Item=order)
गलत। Scan-then-write check atomic नहीं है, इसलिए दो concurrent retries दोनों check pass कर सकते हैं और write कर सकते हैं।
・ table.put_item(
Item=order,
ReturnValues="ALL_OLD") # keep old item
गलत। ReturnValues केवल यह report करता है कि क्या replace किया गया था; overwrite अब भी silently होती है।
Explanation
attribute_not_exists के साथ conditional write insert को atomic और idempotent बनाती है: पहला request जीतता है और same key वाली हर retry DynamoDB द्वारा ही reject कर दी जाती है।
Example8 · Development with AWS Services
एक flash sale कुछ minutes के लिए order traffic को बीस गुना बढ़ा देती है। Storefront को हर order को तुरंत accept और acknowledge करना होगा, जबकि warehouse fulfillment tier अपनी steady rate पर काम करती रहे। कौन सा pattern उपयुक्त है?
・Fulfillment database को scale करें ताकि spike के दौरान हर order synchronously process हो
गलत। Synchronous processing acknowledgment latency को fulfillment capacity से जोड़ता है, जो spike को तोड़ देता है।
・Warehouse fulfillment rate से तेज़ आने वाले किसी भी order के लिए HTTP 429 return करें
गलत। Sale के दौरान orders reject करना revenue को absorb करने की बजाय उसे फेंक देता है।
・एक EC2 instance पर file में orders append करें और fulfillment को nightly batch के रूप में चलाएं
गलत। Single-instance file एक durability risk है और nightly batching immediate-acknowledgment की ज़रूरत का उल्लंघन करती है।
✓Amazon SQS में accepted orders queue करें और fulfillment workers को अपनी गति से consume करने दें
सही। SQS buffer intake को fulfillment से decouple करता है: API तुरंत acknowledge करती है और workers sustainable rate पर queue drain करते हैं।
Explanation
Asynchronous queue-based decoupling intake tier को instantly acknowledge करने देता है जबकि एक slower consumer tier backlog process करती है, जो bursty order traffic का standard जवाब है।
Example9 · Development with AWS Services
एक marketplace EventBridge bus पर OrderPlaced events publish करती है। जिन orders का detail.total 5000 से अधिक हो, उन्हें additionally fraud-review Lambda invoke करना होगा, जबकि छोटे orders इसे trigger नहीं करने चाहिए। Fraud rule पर कौन सा event pattern सही है?
・ {"detail": {"total":
["5000+", "high"]}}
गलत। ये literal string matches हैं; 7200 का numeric total कभी भी string "5000+" के बराबर नहीं होगा।
・ {"source": ["orders.large"],
"detail": {}}
गलत। Source पर matching producer को orders को खुद classify करने के लिए मजबूर करेगी, जो rule-side filtering को हरा देती है।
・ {"detail-type":
[{"prefix": "Order"}]}
गलत। detail-type पर prefix match amount की परवाह किए बिना हर order event को select करती है।
✓ {"detail": {"total":
[{"numeric": [">", 5000]}]}}
सही। EventBridge numeric matching total field को threshold के विरुद्ध compare करती है ताकि केवल qualifying events rule के target तक पहुंचें।
Explanation
EventBridge rules event patterns के अंदर numeric comparison operators को support करते हैं, जिससे consumer-side rule केवल monetary threshold से ऊपर के events को select करता है।
Example10 · Development with AWS Services
एक प्लांट-मॉनिटरिंग प्लेटफ़ॉर्म 5,000 CNC मशीनों से वाइब्रेशन रीडिंग इनजेस्ट करता है। एक ही मशीन की रीडिंग आगमन क्रम में प्रोसेस होनी चाहिए, और दो अलग-अलग कंज़्यूमर एप्लिकेशन — anomaly detection और long-term archival — को प्रत्येक को स्वतंत्र रूप से पूरी स्ट्रीम पढ़नी है। दोनों ज़रूरतें पूरी करने वाला कौन-सा दृष्टिकोण है?
✓Kinesis data stream में machine ID partition key रखते हुए रीडिंग publish करें, प्रत्येक एप्लिकेशन independently consume करे
सही। machine ID का partition key रखने से shard के अंदर per-machine order बना रहता है, और कई consumers पूरी stream स्वतंत्र रूप से पढ़ सकते हैं।
・रीडिंग एक standard SQS queue में भेजें और दोनों consumer applications उसी एक queue से अपने messages poll करें
गलत। एक SQS queue पर दो consumers messages आपस में बाँट लेते हैं; किसी को भी पूरा feed नहीं मिलता।
・रीडिंग एक SNS topic पर publish करें और हर subscriber के लिए strict ordering की उम्मीद topic पर रखें
गलत। SNS standard topic subscribers को ordered delivery की गारंटी नहीं देता।
・प्रत्येक रीडिंग S3 bucket में लिखें और दोनों consumers निश्चित schedule पर नए objects के लिए bucket list करें
गलत। Periodic bucket listing में latency होती है और per-machine ordering की कोई गारंटी नहीं होती।
Explanation
Kinesis Data Streams partition key के अनुसार ordering बनाए रखता है और कई स्वतंत्र consumers को सपोर्ट करता है, जो इस telemetry workload के लिए आवश्यक ordered, fan-out streaming pattern है।
Example11 · Development with AWS Services
एक supplier portal plant managers को production-history export request करने देता है जिसे बनने में कई मिनट लगते हैं। Web request को tracking ID के साथ जल्दी वापस आना चाहिए जबकि export background में बनता रहे। कौन-सा pattern उपयुक्त है?
・Web tier पर HTTP connection खुला रखें और export file पूरी तरह बनने तक progress bytes stream करें
गलत। कनेक्शन मिनटों तक खुला रखने से web tier अवरुद्ध हो जाता है और client disconnect पर टूट जाता है।
✓HTTP 202 job ID के साथ return करें, SQS में request queue करें, और एक worker export बनाए
सही। Job स्वीकार करना, tracking ID return करना, और queue से asynchronously process करना लंबे काम के लिए standard async pattern है।
・API Gateway integration timeout बढ़ाएं ताकि synchronous request पूरे export के लिए प्रतीक्षा कर सके
गलत। API Gateway का integration timeout इस pattern के लिए multi-minute synchronous wait तक नहीं बढ़ाया जा सकता।
・Browser एक ही synchronous export request loop में retry करता रहे जब तक कोई एक attempt सफल न हो
गलत। Synchronous long request retry करने से महंगा काम दोहराया जाता है और हर attempt ब्लॉक रहती है।
Explanation
लंबे काम को asynchronous boundary के पीछे रखना चाहिए: identifier के साथ जल्दी acknowledge करें, queue से process करें, और clients को poll या notify करने दें।
Example12 · Development with AWS Services
एक शहर का building-permit portal अपनी document-validation service को synchronously call करता है, जिससे month-end peaks के दौरान validation धीमा होने पर resident submissions विफल हो जाती हैं। टीम चाहती है कि validation में देरी होने पर भी submissions स्वीकार हों। उन्हें क्या बदलना चाहिए?
✓Submission API और validation workers के बीच एक SQS queue place करें ताकि submissions decouple हों
सही। Queue intake को validation से decouple करती है, जिससे submissions durably store होती हैं और workers के catch up करने पर process होती हैं।
・Synchronous HTTP timeout बढ़ाएं ताकि web tier धीमी validation का इंतजार कर सके
गलत। लंबे wait से भी हर submission validation availability से बंधी रहती है और user experience बिगड़ता है।
・Validation service को बहुत बड़े instance पर migrate करें ताकि वह कभी धीमी न हो
गलत। Vertical scaling से समस्या टलती है; tiers synchronous call से tightly coupled ही रहती हैं।
・Residents के browsers को पूरा application दोबारा submit करते रहने दें जब तक validation जवाब न दे
गलत। Client-side resubmission से peaks के दौरान load बढ़ता है और duplicate applications बन सकती हैं।
Explanation
Queue के जरिए loose coupling intake tier को processing tier की speed से independently काम करने देती है, जो SQS-based asynchronous pattern का मूल है।
Example13 · Development with AWS Services
एक transit authority की arrival-board API एक third-party geocoding provider पर निर्भर है जो कई मिनटों की outages झेलती है। Outages के दौरान API को रुकने की बजाय cached stop coordinates serve करते रहना चाहिए। कौन सा code pattern यह करता है?
・ while not geocode_ok:
r = geocode(addr) # provider के जवाब देने तक call करते रहो
गलत। Blocking retry loop टूटे provider पर बार-बार hit करता है और हर arrival-board request को freeze कर देता है।
・ r = geocode(addr, timeout=300)
return r # एक बहुत लंबा wait, कोई failure handling नहीं
गलत। Timeout बढ़ाने से हर request मिनटों तक hang करती है; कुछ handle नहीं होता।
✓ if breaker.is_open():
return cached_stop_location()
try:
r = geocode(addr)
breaker.record_success()
except Timeout:
breaker.record_failure()
return cached_stop_location()
सही। Circuit breaker failing provider को call करना बंद कर देता है और cached coordinates पर gracefully degrade करता है।
・ r = geocode(addr)
return r # provider errors सीधे हर caller तक पहुंचने दो
गलत। Raw provider errors को propagate करने से एक dependency outage पूरा API outage बन जाता है।
Explanation
Circuit breakers के साथ fallback path application को third-party outages के दौरान responsive रखते हैं: repeated failures पर trip करो, degraded data serve करो, और recovery के लिए probe करो।
Example14 · Development with AWS Services
एक मल्टी-टेनेंट प्रोजेक्ट-मैनेजमेंट SaaS नए workspaces को एक ही monolithic request handler में sign up करता है, जो welcome email भेजता है और sample data inline provision भी करता है। जब email provider धीमा हो जाता है, signups timeout हो जाते हैं। कौन सा बदलाव इन steps को decouple करता है?
・signup endpoint का HTTP timeout बढ़ाएं ताकि request handler email provider के पूरा होने का इंतजार कर सके
गलत। लंबा timeout signup latency को email provider से जोड़े रखता है और users को और अधिक प्रतीक्षा कराता है।
✓एक SQS queue में workspace-created message publish करें और email sending तथा sample-data provisioning को अलग consumers में ले जाएं
सही। Queue signup handler को तुरंत return करने देती है जबकि independent consumers अपनी गति से email और provisioning process करते हैं।
・email provider को एक दूसरे synchronous REST hop से call करें ताकि monolith में वह code न रहे
गलत। synchronous hop code को हटा देता है लेकिन tight runtime coupling और timeout की समस्या बनी रहती है।
・उसी process के एक ही thread में email sending चलाएं और response तब तक रोकें जब तक सभी threads पूरे न हो जाएं
गलत। In-process threads response को slow dependency से बांधे रखते हैं और process के साथ बंद हो जाते हैं।
Explanation
Loosely coupled designs user-facing request और slow side effects के बीच SQS जैसा durable message channel रखते हैं, ताकि प्रत्येक component स्वतंत्र रूप से fail और scale हो सके।
Example15 · Development with AWS Services
एक video platform creators को transcoding के लिए uploads submit करने देता है, जिसमें प्रति file 5 से 40 मिनट लगते हैं। upload API को कुछ seconds में respond करना होगा, और creators बाद में एक status endpoint poll करते हैं। कौन सा pattern सही है?
・HTTP connection खुला रखें upload API से जब तक transcode job पूरा न हो और final result return करें
गलत। 40 मिनट तक connections खुले रखना resources exhaust करता है और client तथा gateway timeouts को तोड़ता है।
・API Gateway को transcoder को synchronously invoke करें लंबे integration timeout के साथ ताकि caller finished file प्राप्त कर सके
गलत। API Gateway integration timeouts transcode से बहुत कम होते हैं, इसलिए synchronous invocation काम नहीं कर सकता।
・एक batch job schedule करें जो प्रति घंटे सभी pending uploads transcode करे और बाद में creators को email से notify करे
गलत। Hourly batching एक घंटे तक की अनावश्यक देरी जोड़ता है और polling design से मेल नहीं खाता।
✓तुरंत एक job identifier return करें, SQS में transcode request queue करें, और workers को job status asynchronously update करने दें
सही। Job accept करना, queue करना, और बाद में status report करना long-running work के लिए standard asynchronous pattern है।
Explanation
Long-running work asynchronous pattern के पीछे होनी चाहिए: request accept करें, job ID return करें, queue से process करें, और status अलग से expose करें।
▶ Try 10 free questions (graded)