New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon DOP-C02 Exam - Topic 6 Question 29 Discussion

Actual exam question for Amazon's DOP-C02 exam
Question #: 29
Topic #: 6
[All DOP-C02 Questions]

A DevOps engineer manages a large commercial website that runs on Amazon EC2. The website uses Amazon Kinesis Data Streams to collect and process web togs. The DevOps engineer manages the Kinesis consumer application, which also runs on Amazon EC2.

Sudden increases of data cause the Kinesis consumer application to (all behind and the Kinesis data streams drop records before the records can be processed. The DevOps engineer must implement a solution to improve stream handling.

Which solution meets these requirements with the MOST operational efficiency?

Show Suggested Answer Hide Answer
Suggested Answer: A

* Configure AWS Systems Manager on Each Instance:

AWS Systems Manager provides a unified interface for managing AWS resources. Install the Systems Manager agent on each EC2 instance to enable inventory management and other features.

* Use AWS Systems Manager Inventory:

Systems Manager Inventory collects metadata about your instances and the software installed on them. This data includes information about applications, network configurations, and more.

Enable Systems Manager Inventory on all EC2 instances to gather detailed information about installed applications.

* Use Systems Manager Resource Data Sync to Synchronize and Store Findings in an Amazon S3 Bucket:

Resource Data Sync aggregates inventory data from multiple accounts and regions into a single S3 bucket, making it easier to query and analyze the data.

Configure Resource Data Sync to automatically transfer inventory data to an S3 bucket for centralized storage.

* Create an AWS Lambda Function that Runs When New Objects are Added to the S3 Bucket:

Use an S3 event to trigger a Lambda function whenever new inventory data is added to the S3 bucket.

The Lambda function can parse the inventory data and check for the presence of prohibited applications.

* Configure the Lambda Function to Identify Prohibited Applications:

The Lambda function should be programmed to scan the inventory data for any known prohibited applications and generate alerts or take appropriate actions if such applications are found.

Example Lambda function in Python

import json

import boto3

def lambda_handler(event, context):

s3 = boto3.client('s3')

bucket = event['Records'][0]['s3']['bucket']['name']

key = event['Records'][0]['s3']['object']['key']

response = s3.get_object(Bucket=bucket, Key=key)

inventory_data = json.loads(response['Body'].read().decode('utf-8'))

prohibited_apps = ['app1', 'app2']

for instance in inventory_data['Instances']:

for app in instance['Applications']:

if app['Name'] in prohibited_apps:

# Send notification or take action

print(f'Prohibited application found: {app['Name']} on instance {instance['InstanceId']}')

return {'statusCode': 200, 'body': json.dumps('Check completed')}

By leveraging AWS Systems Manager Inventory, Resource Data Sync, and Lambda, this solution provides an efficient and automated way to audit EC2 instances for prohibited applications.


AWS Systems Manager Inventory

AWS Systems Manager Resource Data Sync

S3 Event Notifications

AWS Lambda

Contribute your Thoughts:

0/2000 characters
Britt
3 months ago
A is interesting, but it feels a bit complex for this scenario.
upvoted 0 times
...
Lizbeth
3 months ago
Wait, can Lambda handle that much data? Sounds risky!
upvoted 0 times
...
Tandra
3 months ago
D seems like a quick fix, but is it really the best long-term?
upvoted 0 times
...
Delmy
4 months ago
I think C is the way to go, Lambda is super efficient!
upvoted 0 times
...
Noel
4 months ago
Option B sounds solid for scaling up.
upvoted 0 times
...
Alecia
4 months ago
I’m a bit uncertain about option A. Storing logs in S3 and using EMR sounds like a solid approach, but I’m not sure if it’s the most efficient way to handle real-time processing.
upvoted 0 times
...
Barrett
4 months ago
Increasing the number of shards in option D could help with throughput, but I wonder if that would complicate the architecture too much. I feel like we had a similar question about scaling Kinesis streams.
upvoted 0 times
...
Elise
4 months ago
I think option C sounds familiar. We talked about using AWS Lambda for event-driven architectures, and it could definitely improve efficiency by automatically scaling with the data stream.
upvoted 0 times
...
Willow
5 months ago
I remember we discussed the importance of scaling applications in our last practice session. Option B seems like it could help with that, but I'm not sure if just adding more EC2 instances is the best long-term solution.
upvoted 0 times
...
Serina
5 months ago
I'm leaning towards Option D. Increasing the number of shards in the Kinesis data streams seems like a straightforward way to boost the overall throughput and prevent the consumer application from falling behind. It's a simple fix that could solve the problem effectively.
upvoted 0 times
...
Fatima
5 months ago
Option C looks interesting - converting the consumer application to a Lambda function could provide more scalability and flexibility. But I'm not sure if that would be the most operationally efficient solution compared to the other options.
upvoted 0 times
...
Xochitl
5 months ago
I'm a bit confused by the question. It's not clear to me whether we should be focusing on improving the Kinesis consumer application or the Kinesis data streams themselves. I'll need to think this through carefully before deciding on the best solution.
upvoted 0 times
...
Miles
5 months ago
I think the key here is to find a solution that can handle the sudden increases in data without dropping records. Option B seems like a good approach - scaling the consumer application and increasing the Kinesis stream retention period could help prevent data loss.
upvoted 0 times
...
Rory
5 months ago
I'm not too familiar with Prisma Cloud, so I'm a bit unsure about this one. I'll need to review the information about its supported data storage types before making a guess.
upvoted 0 times
...
Katie
5 months ago
This seems like a tricky situation. I'm not sure if ignoring the stakeholder is the best approach, but escalating to upper management could cause more problems. I think addressing the issue directly with the stakeholder might be the way to go.
upvoted 0 times
...
Luis
9 months ago
Oh, man, can you imagine the look on the DevOps engineer's face when those logs started piling up? I'd be reaching for the coffee and the antacids!
upvoted 0 times
Audry
8 months ago
D: What about converting the Kinesis consumer application to run as an AWS Lambda function? That could be a more efficient solution.
upvoted 0 times
...
Selma
8 months ago
C: Yeah, that sounds like a good idea. Increasing the retention period of the Kinesis data streams could also help.
upvoted 0 times
...
Michal
8 months ago
B: I think the best solution would be to horizontally scale the Kinesis consumer application by adding more EC2 instances.
upvoted 0 times
...
Leota
8 months ago
A: I know, that must have been a nightmare to deal with!
upvoted 0 times
...
...
Jamal
9 months ago
I don't know, option D just seems like a band-aid solution. Increasing the number of shards might help in the short term, but it doesn't address the root cause of the problem.
upvoted 0 times
Elinore
8 months ago
C: Yeah, I think option A is the way to go. It addresses the issue at its core.
upvoted 0 times
...
Aimee
9 months ago
B: I agree, option A seems like a more sustainable solution in the long run.
upvoted 0 times
...
Sylvia
9 months ago
A: I think option A is the best solution. Storing the logs in Amazon S3 and processing the data with Amazon EMR seems like a more efficient approach.
upvoted 0 times
...
...
Felicidad
10 months ago
Haha, I bet the DevOps engineer is losing their mind trying to keep up with all those logs! Option A sounds like a lot of work, but it could provide some serious insights.
upvoted 0 times
Eliz
8 months ago
User 3: I think Option B might be more efficient in handling the sudden increases in data.
upvoted 0 times
...
Lashonda
8 months ago
User 2: Option A does seem like a lot of work, but it could really help with getting insights.
upvoted 0 times
...
Tamekia
9 months ago
User 1: Yeah, dealing with all those logs must be a nightmare.
upvoted 0 times
...
...
Shonda
10 months ago
I'm leaning towards option C. Running the consumer as a Lambda function could provide more scalability and reduce the management overhead.
upvoted 0 times
Dell
8 months ago
That's a good point. Lambda could definitely reduce management overhead.
upvoted 0 times
...
Nettie
8 months ago
True, but with Lambda, you don't have to worry about managing EC2 instances.
upvoted 0 times
...
Allene
9 months ago
But what about option D? Increasing the number of shards could also improve throughput.
upvoted 0 times
...
Reed
10 months ago
Option C sounds like a good choice. Running as a Lambda function could help with scalability.
upvoted 0 times
...
...
Mira
10 months ago
That's a valid point, but I still think option A is better in terms of long-term efficiency and scalability.
upvoted 0 times
...
Sherell
11 months ago
Hmm, option B seems like the most straightforward approach. Scaling the consumer application and increasing the Kinesis stream retention should help handle the sudden data spikes.
upvoted 0 times
Jesusita
9 months ago
True, increasing the number of shards could definitely help with processing the data faster.
upvoted 0 times
...
Yuki
10 months ago
B sounds good, but D might be more effective in handling the sudden data spikes.
upvoted 0 times
...
Allene
10 months ago
D) Increase the number of shards in the Kinesis data streams to increase the overall throughput so that the consumer application processes the data faster.
upvoted 0 times
...
Isadora
10 months ago
Yes, scaling the consumer application and increasing the retention period of the Kinesis data streams should improve stream handling efficiency.
upvoted 0 times
...
Willow
10 months ago
I agree, option B seems like a practical solution to handle the sudden data spikes.
upvoted 0 times
...
Charolette
10 months ago
B) Horizontally scale the Kinesis consumer application by adding more EC2 instances based on the Amazon CloudWatch GetRecords IteratorAgeMilliseconds metric Increase the retention period of the Kinesis data streams.
upvoted 0 times
...
...
Ezekiel
11 months ago
I disagree, I believe option B is more efficient. Scaling the Kinesis consumer application based on CloudWatch metrics will help handle sudden increases in data.
upvoted 0 times
...
Mira
11 months ago
I think option A is the best solution because storing logs in Amazon S3 will ensure durability and using Amazon EMR for processing will improve efficiency.
upvoted 0 times
...

Save Cancel