Automating Dedicated License Allocation at Scale

Answer Correct answer: B — Upload licenses to a DynamoDB table to allow dynamic acquisition, automated release via lifecycle hooks, and dashboard creation.

A company is creating a software solution that executes a specific parallel-processing mechanism. The software can scale to tens of servers in some special scenarios. This solution uses a proprietary library that is license-based, requiring that each individual server have a single, dedicated license installed. The company has 200 licenses and is planning to run 200 server nodes concurrently at most. The company has requested the following features: ✑ A mechanism to automate the use of the licenses at scale. ✑ Creation of a dashboard to use in the future to verify which licenses are available at any moment. What is the MOST effective way to accomplish these requirements?

  1. Upload the licenses to a private Amazon S3 bucket. Create an AWS CloudFormation template with a Mappings section for the licenses. In the template, create an Auto Scaling group to launch the servers. In the user data script, acquire an available license from the Mappings section. Create an Auto Scaling lifecycle hook, then use it to update the mapping after the instance is terminated.
  2. Upload the licenses to an Amazon DynamoDB table. Create an AWS CloudFormation template that uses an Auto Scaling group to launch the servers. In the user data script, acquire an available license from the DynamoDB table. Create an Auto Scaling lifecycle hook, then use it to update the mapping after the instance is terminated. Correct Answer
  3. Upload the licenses to a private Amazon S3 bucket. Populate an Amazon SQS queue with the list of licenses stored in S3. Create an AWS CloudFormation template that uses an Auto Scaling group to launch the servers. In the user data script acquire an available license from SQS. Create an Auto Scaling lifecycle hook, then use it to put the license back in SQS after the instance is terminated.
  4. Upload the licenses to an Amazon DynamoDB table. Create an AWS CLI script to launch the servers by using the parameter --count, with min:max instances to launch. In the user data script, acquire an available license from the DynamoDB table. Monitor each instance and, in case of failure, replace the instance, then manually update the DynamoDB table.

Community Insight

The question tests the ability to choose a data store that supports both atomic state updates for distributed locking and easy querying for a dashboard, exposing the trap of using static Mappings or opaque queues.

This solution establishes that Amazon DynamoDB is the most effective service for automating dedicated license allocation at scale while supporting a dashboard to track availability. It highlights why DynamoDB's dynamic state tracking surpasses static CloudFormation Mappings or opaque SQS queues.

Choosing SQS (Option C) because it can distribute items, without realizing SQS cannot easily provide a dashboard to verify which specific licenses are available at any given moment.

Community Discussion (42 comments)

paulmanoj 👍 1 Selected: C
This is the best fit because SQS can act as a pool of available licenses. Each instance takes one license identifier from the queue when it launches, which prevents multiple instances from using the same license. When the instance terminates, an Auto Scaling lifecycle hook can return that license to the queue. It also satisfies the dashboard requirement: the number of available licenses can be monitored through Amazon SQS queue metrics in CloudWatch, such as the number of visible messages. With 200 licenses, roughly speaking, 150 visible messages would indicate about 150 licenses are currently available.
052cedf 👍 2 Selected: C
While DynamoDB can store license state, SQS is more operationally efficient for a pool of identical tokens because it provides built-in message visibility and native metrics that serve as the requested dashboard.
Tika01 👍 1 Selected: B
This approach allows the licenses to be stored and managed in a central location in an Amazon DynamoDB table. The AWS CloudFormation template can then use an Auto Scaling group to launch the server nodes, which will dynamically acquire a license from the DynamoDB table when the instance starts up using the user data script. An Auto Scaling lifecycle hook can be created to update the license mapping after the instance is terminated. This mechanism allows the software solution to scale and manage licenses automatically. Additionally, the DynamoDB table can be used to create a dashboard that displays which licenses are available at any moment, giving the company greater visibility into license usage.
okm1997_2 👍 2 Selected: B
B is correct because as one condition states that we need to create a dashboard that can be done using dynamodb, Cloudformation instead of CLI scripts to launch instance nodes using ASG. We can use acquire license using TransactGetItems which would in User Data script. ASG lifecycle hook consists terminating:wait where we can run scripts to complete dynamodb transaction on the instance using SSM run command with SSM agent installed on the instance from user data script
hoomaan 👍 1
B- Correct
BelloMio 👍 1
How is B the correct answer? What does it even mean update the mapping? What mapping?
Piccaso 👍 1 Selected: B
DynamoDB is a must. S3 bucket is not efficient as DynamoDB CloudFormation is more effective than self-prepared CLI script
Hackmajoris 👍 2
Why D is set as the correct answer?
Piccaso 👍 1
Same confusion.
Bulti 👍 1
B is the right answer.
Teonardo 👍 1 Selected: B
B is the right answer
ceros399 👍 2 Selected: B
B is the good for me
ericzaj 👍 4
The Dev Ops Pro is a measure of how well you know automation. D requires manual intervention. B looks to be the right solution.
developer_404 👍 4 Selected: B
A - S3 contains static data and there is no information on the available licenses to create dashboard. B- DynamoDb contains mapping on the availability of licenses and can create dashboard on the data. C - Overhead to maintain S3 and SQS. Hard to create Dashboard out of SQS. D - Manual update , no no
nzin4x 👍 2 Selected: B
B is right answer
RogerMarsh 👍 1
B is correct.
colinquek 👍 2
B - becos: 1. dynamodb's transactgetitem api- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html#transaction-apis-txgetitems 2. CF to generate ASG to manage the EC2s.
blueorca 👍 2 Selected: B
Should be B
D2 👍 2
Answer B
30th 👍 5
"B" is the right answer. "A dashboard to verify which licenses are available." is a key requirement. S3 and SQS won't provide you such a feature. "D" includes CLI scripts. CLI works in most cases, but it is never a right answer if an AWS native solution is available.
mo_awsdevops 👍 1
b it is
WhyIronMan 👍 2
I'll go with B
aws_Tamilan 👍 1
Correct Answer: B
yyy 👍 1
I believe to C: because lifecycle hook can work with SQS directly https://docs.aws.amazon.com/autoscaling/ec2/userguide/configuring-lifecycle-hook-notifications.html
fogunfunminiyi 👍 2
If you go for A, how do you create dashboard on information stored in the mapping section. There is a need to create dashboard of available license. That is easy with B. So having eliminated D, because of the manual process. You should go for B
ChauPhan 👍 1
I'll go with B
SPRao 👍 1
option B is correct, because once the instance terminate ASG uses lifecycle hooks to update mapping
Raj9 👍 17
A - license list is dynamic (based on scaling) and mapping are good for values that are static in nature B - looks good C - sqs - unnecessary overhead D - too many manual tasks
zkchen 👍 1
I prefer to C because of the keyword “parallel” and “MOST effective”. how to guarantee two instances don't get the same copy using dynamoDB?
lokey 👍 1
i believe DynamoDB transactions can cover this
Kayode 👍 2
The answer is B
yassu 👍 1
B is correct
xaocho 👍 1
It is B
dinhvu 👍 2
I go with B
un 👍 2
I will go with B
ppshein 👍 3
I will go with B. Using cli is not efficient way to do it.
amzngenius 👍 2
B is MOST effective way
jiedee 👍 2
I go with b
toshko85 👍 1
It's not about Mappings in CloudFormation, rather A doesn't provide complete answer. I believe it's B because DynamoDB looks good place to store such info.
BeastX 👍 2
Why not A
Arragon 👍 4
Because the mappings section in a CloudFromation template can't be used to store variables. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html
marwan 👍 24
I believe B is the right solution

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option B correctly leverages Amazon DynamoDB to store and manage the 200 licenses dynamically. DynamoDB supports atomic updates and conditional writes, ensuring that concurrent instances do not acquire the same dedicated license. Furthermore, because DynamoDB is a queryable database, it trivially supports the requirement to create a dashboard to verify which licenses are available at any moment. Using an Auto Scaling lifecycle hook ensures licenses are automatically released back to the pool upon instance termination.

Why the Other Options Are Wrong

Option A is incorrect because CloudFormation Mappings are static key-value pairs evaluated only during stack creation or update; they cannot be dynamically updated by user data scripts or lifecycle hooks at runtime. Option C is incorrect because while Amazon SQS can distribute licenses, it is an opaque queue that makes it extremely difficult to build a dashboard showing exactly which licenses are available at any moment. Option D is incorrect because it relies on manual updates and AWS CLI scripts rather than a fully automated, native Auto Scaling configuration.

Community Comment Notes

Commenters correctly pointed out that CloudFormation Mappings are static, as Raj9 noted by stating "mapping are good for values that are static in nature". The dashboard requirement was a decisive factor, with 30th observing that "S3 and SQS won't provide you such a feature". Additionally, developer_404 highlighted that "DynamoDb contains mapping on the availability of licenses and can create dashboard on the data".

Official Reference

Exam Strategy

When a question requires both distributed state management (like a license pool) and visibility (like a dashboard), choose a database service like DynamoDB over messaging (SQS) or static configuration (Mappings). Avoid any option that introduces manual steps when a native automation feature exists.

Related Analysis

Practice All DOP-C02 Questions

Access 85 questions with complete answers and detailed explanations.

View Full DOP-C02 Practice Test →

← Back to DOP-C02 Study Guide