Automating Dedicated License Allocation at Scale

DOP-C02 By islever Editorial Last updated

Short answer

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

Question

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.

Key Takeaways

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.

Common mistake: 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.

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

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html

This link opens the official vendor documentation in a new tab.

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.

Discussion 40 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 30 of 40

  1. marwan 👍 24
    I believe B is the right solution
  2. 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
  3. 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.
  4. developer_404 👍 4 Answered 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
  5. 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
Show 25 more comments
  1. 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.
  2. ppshein 👍 3
    I will go with B. Using cli is not efficient way to do it.
  3. okm1997_2 👍 2 Answered 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
  4. 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
  5. 052cedf 👍 2 Answered 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.
  6. 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.
  7. Hackmajoris 👍 2
    Why D is set as the correct answer?
  8. amzngenius 👍 2
    B is MOST effective way
  9. ceros399 👍 2 Answered B
    B is the good for me
  10. nzin4x 👍 2 Answered B
    B is right answer
  11. un 👍 2
    I will go with B
  12. Kayode 👍 2
    The answer is B
  13. WhyIronMan 👍 2
    I'll go with B
  14. blueorca 👍 2 Answered B
    Should be B
  15. dinhvu 👍 2
    I go with B
  16. BeastX 👍 2
    Why not A
  17. D2 👍 2
    Answer B
  18. Tika01 👍 1 Answered 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.
  19. paulmanoj 👍 1 Answered 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.
  20. 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
  21. 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.
  22. 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?
  23. Piccaso 👍 1 Answered B
    DynamoDB is a must. S3 bucket is not efficient as DynamoDB CloudFormation is more effective than self-prepared CLI script
  24. SPRao 👍 1
    option B is correct, because once the instance terminate ASG uses lifecycle hooks to update mapping
  25. BelloMio 👍 1
    How is B the correct answer? What does it even mean update the mapping? What mapping?

Reader comments & corrections

No reader corrections 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.

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