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 9 Question 27 Discussion

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

A company uses Amazon EC2 as its primary compute platform. A DevOps team wants to audit the company's EC2 instances to check whether any prohibited applications have been installed on the EC2 instances.

Which solution will meet 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
Walton
3 months ago
Wait, can CloudTrail really filter those events accurately?
upvoted 0 times
...
Aretha
3 months ago
A looks interesting with the Lambda function, but seems complex.
upvoted 0 times
...
Lindsay
3 months ago
I'm not so sure about B, what if the rules miss something?
upvoted 0 times
...
Carmen
4 months ago
I agree, B is straightforward and leverages existing tools.
upvoted 0 times
...
Trinidad
4 months ago
Option B seems the most efficient with AWS Config rules.
upvoted 0 times
...
Jesusita
4 months ago
I think using CloudWatch Logs could work, but it seems more manual with the script. I wonder if there's a more automated solution among the options.
upvoted 0 times
...
Audria
4 months ago
I feel like filtering AWS CloudTrail events might be a bit complex for this task. I can't recall if it was the most efficient method we covered.
upvoted 0 times
...
Magdalene
4 months ago
I'm not entirely sure, but I think AWS Config rules could be effective for monitoring changes. We practiced a similar question about compliance checks last week.
upvoted 0 times
...
Alexis
5 months ago
I remember we discussed using AWS Systems Manager for inventory management in our study group. It seems like a solid choice for this scenario.
upvoted 0 times
...
Shawna
5 months ago
I'm leaning towards option C. Filtering the CloudTrail logs for the Systems Manager Inventory events seems like a simple and effective way to identify any prohibited applications. It doesn't require as much setup as the other options, and it leverages existing AWS services that we're already using.
upvoted 0 times
...
Rosamond
5 months ago
Option A looks like the way to go. Automating the process with Systems Manager and Lambda seems like it would be the most efficient and scalable solution. I like how it centralizes the findings in an S3 bucket and then uses a Lambda function to analyze them. Seems like a good way to keep things organized and easy to maintain.
upvoted 0 times
...
Tamala
5 months ago
I'm a bit confused by the different options here. They all seem to involve using AWS Systems Manager, but the details around how to identify the prohibited applications vary. I'll need to carefully review each option to understand the nuances and decide which one is the most operationally efficient.
upvoted 0 times
...
Carmelina
5 months ago
This seems like a straightforward question, and I think option A is the most efficient solution. Using AWS Systems Manager to inventory the instances and then leveraging a Lambda function to analyze the findings seems like a clean and automated approach.
upvoted 0 times
...
Edgar
5 months ago
I feel pretty confident about this. The code is straightforward, and I think the answer is C - aPromise and bPromise run in parallel.
upvoted 0 times
...
France
5 months ago
The answer is definitely "hovtest". That's the SAS procedure specifically designed to test the homogeneity of variance assumption in the GLM model. I'm pretty sure about this one.
upvoted 0 times
...
Willard
5 months ago
I think the answer might be "longest idle time" since it seems to match what we practiced about hunting calls.
upvoted 0 times
...
Arthur
5 months ago
I think option C makes the most sense since having the ability to replace parts means we avoid vendor lock-in, right? That was a key point in our case studies.
upvoted 0 times
...
Dorothy
5 months ago
I've got a good feeling about this one. Based on my understanding of 2-port CFP line cards, I think the correct answers are A and D - the 2 x 100G muxponder into 200G line card, and the two 100G clients into two 100G WDM line cards.
upvoted 0 times
...
Laticia
2 years ago
Haha, I wonder if the prohibited apps are things like Doom or Solitaire. Gotta keep those productivity-killers off the company servers!
upvoted 0 times
Lewis
2 years ago
D) Designate Amazon CloudWatch Logs as the log destination for all application instances Run an automated script across all instances to create an inventory of installed applications Configure the script to forward the results to CloudWatch Logs Create a CloudWatch alarm that uses filter patterns to search log data to identify prohibited applications.
upvoted 0 times
...
Kirk
2 years ago
C) Configure AWS Systems Manager on each instance. Use Systems Manager Inventory. Filter a trail in AWS CloudTrail for Systems Manager Inventory events to identify prohibited applications.
upvoted 0 times
...
Latricia
2 years ago
B) Configure AWS Systems Manager on each instance Use Systems Manager Inventory Create AWS Config rules that monitor changes from Systems Manager Inventory to identify prohibited applications.
upvoted 0 times
...
Una
2 years ago
A) Configure AWS Systems Manager on each instance Use AWS Systems Manager Inventory Use Systems Manager resource data sync to synchronize and store findings in an Amazon S3 bucket Create an AWS Lambda function that runs when new objects are added to the S3 bucket. Configure the Lambda function to identify prohibited applications.
upvoted 0 times
...
...
Maxima
2 years ago
C is a good option, but I'm not sure filtering CloudTrail events is as efficient as the dedicated inventory and notification approach in A and B.
upvoted 0 times
...
Eura
2 years ago
I'm not sure, I think option B could also be a good choice with AWS Config rules monitoring changes from Systems Manager Inventory.
upvoted 0 times
...
Rolland
2 years ago
I agree with Sue. Option A seems to be the most operational efficient solution for auditing EC2 instances.
upvoted 0 times
...
Corrie
2 years ago
D looks like a lot of manual work compared to the other options. Relying on CloudWatch Logs and custom scripts doesn't seem as streamlined as the Systems Manager solutions.
upvoted 0 times
Aliza
2 years ago
C) Configure AWS Systems Manager on each instance. Use Systems Manager Inventory. Filter a trail in AWS CloudTrail for Systems Manager Inventory events to identify prohibited applications.
upvoted 0 times
...
Tequila
2 years ago
A) Configure AWS Systems Manager on each instance Use AWS Systems Manager Inventory Use Systems Manager resource data sync to synchronize and store findings in an Amazon S3 bucket Create an AWS Lambda function that runs when new objects are added to the S3 bucket. Configure the Lambda function to identify prohibited applications.
upvoted 0 times
...
...
Jeannetta
2 years ago
I'm leaning towards B. The Config rules will continuously monitor for changes and detect any prohibited apps, which is pretty efficient in my opinion.
upvoted 0 times
Margo
2 years ago
Yeah, it's definitely efficient to have Config rules in place for that.
upvoted 0 times
...
Stefan
2 years ago
I think B is a good choice too. Continuous monitoring is key.
upvoted 0 times
...
...
Sue
2 years ago
I think option A is the best choice because it uses AWS Systems Manager Inventory and AWS Lambda function to identify prohibited applications efficiently.
upvoted 0 times
...
Coleen
2 years ago
Option A seems the most efficient. Using AWS Systems Manager Inventory and S3 integration with a Lambda function to identify prohibited apps is a robust solution.
upvoted 0 times
Caitlin
2 years ago
Option C might be a bit more complex with filtering CloudTrail events, but it could still be effective.
upvoted 0 times
...
Jade
2 years ago
Option B could also work by configuring AWS Config rules to monitor changes from Systems Manager Inventory.
upvoted 0 times
...
Lezlie
2 years ago
I agree, option A with AWS Systems Manager Inventory and S3 integration seems like the best choice.
upvoted 0 times
...
...

Save Cancel