Sub topic 14
Lenses for specialized workloads
This chapter assumes you know the six pillars, how questions and best practices are organized, how risk levels are assigned, and the basic flow of a workload review in the AWS Well-Architected Tool. It explains what a lens adds to that flow and how to choose one.
What a lens is
The core Well-Architected Framework is deliberately general. Its questions apply to almost any workload, but they can't say much about the details of a particular technology or industry. A lens fills that gap.
A lens is a set of questions, best practices and improvement guidance that extends the framework for a specific domain. It keeps the same structure you already know: it is organized by pillars, each pillar has questions, each question has best practices, and each answer produces a risk level. What changes is the content. A lens asks about the things that matter for that kind of workload.
Two points about how lenses relate to the framework:
- The Well-Architected Framework lens is the base lens. In the CLI it has the alias
wellarchitected, which you saw in thecreate-workloadcommand. - Other lenses add to the base lens. You normally apply the base lens first and add specialized lenses next to it, not in place of it.
Kinds of lenses
Lenses come from three sources.
| Source | Examples | Typical use |
|---|---|---|
| AWS-published lenses | Serverless Applications, SaaS, Machine Learning, Data Analytics, Financial Services Industry, Games Industry | Workloads that match a technology pattern or industry |
| Partner and community lenses | Lenses published through the AWS Well-Architected Partner Program | Vendor-specific or niche workloads |
| Custom lenses | Lenses your own organization writes | Internal standards, compliance rules, platform conventions |
The list of AWS-published lenses changes over time, and some lenses are renamed or restructured. Check the lens catalog in the Well-Architected Tool or the output of list-lenses for what is available in your account today, instead of relying on a fixed list.
What a lens changes in practice
Suppose you review a workload built on Lambda, API Gateway and DynamoDB. The base lens asks about reliability in general terms, such as how you handle change and how you design for failure. The Serverless Applications lens asks the same kind of question, but with serverless details: how you set function concurrency limits, how you handle retries and dead-letter queues, how you structure event-driven flows, and how cold starts affect latency targets.
So a lens gives you three things:
- Specific questions. They surface risks that general questions miss.
- Specific best practices. The guidance names the relevant services, settings and patterns.
- A separate risk count. Each lens has its own answers and its own high and medium risk totals for the workload.
A lens can also overlap with the base lens. You may see a question that resembles one you already answered. Answer it in the context of the lens, since its best practices are more specific.
Choosing lenses
Pick lenses by asking what is distinctive about the workload. A practical decision process:
- Start with the base lens. Every workload gets it.
- Add a technology lens if the architecture centers on a specific pattern, such as serverless, containers, or a data platform.
- Add an industry lens if the workload operates under industry norms or regulation, such as financial services or gaming.
- Add a custom lens if your organization has standards that the AWS lenses don't encode.
- Stop there. Each lens adds questions, and each question needs an informed answer.
Decision criteria
| Question | If yes | If no |
|---|---|---|
| Is the workload built mainly on one specialized pattern? | Add the matching technology lens | Base lens is probably enough |
| Does an industry's rules or conventions shape the design? | Add the industry lens | Skip it |
| Does your organization have review rules that AWS lenses don't cover? | Write a custom lens | Skip it |
| Do you have people available who can answer the extra questions? | Proceed | Defer the lens; unanswered questions give no value |
Gotchas
- Lens sprawl. Applying five lenses to one workload produces hundreds of questions. Reviews then stall or get answered carelessly, and careless answers hide real risks. Prefer fewer lenses answered well.
- Wrong lens for the stage. A new workload in design gets more value from a focused lens than from every lens at once. You can add lenses later.
- Different owners. Questions from a data analytics lens may need a different person than questions from the base lens. Plan who answers what before the session.
- Treating a lens as a compliance certificate. Completing a lens review shows that you evaluated the workload against its practices. It doesn't certify compliance with any regulation.
Working with lenses in the Well-Architected Tool
You attach lenses to a workload when you create it, or later. In the console, you choose lenses on the workload creation page. In the CLI, you pass lens aliases. The create-workload command from earlier used --lenses wellarchitected. To apply more than one lens, list several aliases:
aws wellarchitected list-lenses
aws wellarchitected associate-lenses \
--workload-id <workload-id> \
--lens-aliases serverlesslist-lenses shows the lens aliases and names available to you. The associate-lenses command attaches an additional lens to an existing workload. The alias serverless is an example. Use the alias that list-lenses returns for the lens you want.
Once a lens is attached, you review it the same way as the base lens. You list its answers by passing its alias:
aws wellarchitected list-answers \
--workload-id <workload-id> \
--lens-alias serverless \
--pillar-id reliabilityThe --lens-alias option selects which lens the questions come from. Pillar IDs are shared across lenses, so you can compare, for example, the reliability results of the base lens with those of a specialized lens.
Lens reviews also support milestones. A milestone captures the state of the whole workload, including all attached lenses, so a later review can show progress for each lens.
Lens versions
AWS updates lenses over time, and a lens can have several versions. A workload is reviewed against a specific version. When a newer version is published, the Tool lets you upgrade the review. After an upgrade, expect some questions to be new or changed, and some previous answers to need revisiting. Treat an upgrade as a mini review, not a click-through.
Custom lenses
When no published lens fits, you can write your own. A custom lens is defined in a JSON document that describes:
- the lens name and description,
- its pillars (you can use the standard six or define your own),
- the questions within each pillar,
- the choices (best practices) for each question,
- the risk rules that map the choices selected to a risk level.
Example uses:
- Encoding an internal platform standard, such as "all services log to the central account".
- Capturing compliance controls your auditors expect, phrased as questions.
- Adding guidance for a technology that AWS doesn't publish a lens for.
You upload the document with import-lens, then publish it by creating a lens version, and share it with other accounts or an organization so teams can attach it to their workloads. Keep these constraints in mind:
- A custom lens is only as good as its risk rules. If every choice maps to "no risk", the lens reports nothing.
- You own the maintenance. When the standard changes, publish a new version and ask teams to upgrade.
- Keep the lens small enough that a team can finish it in one session.
Reading lens results
Each lens gives its own risk summary. In the Tool, the workload overview shows the high risk and medium risk counts per lens. Use them as follows:
- Compare counts only within a lens. A lens with more questions has more chances to report risks, so a higher count doesn't mean a worse design.
- Merge the findings when you build the improvement plan. Rank by risk level and business impact across all lenses, not lens by lens.
- Watch for duplicates. The same underlying gap, such as missing alarms, can be flagged by the base lens and by a specialized lens. Fix it once and track it as one item.
Exercise
A team runs an analytics platform for a bank. A review with only the base lens finishes with few risks. A colleague proposes adding five lenses at once to be thorough. What would you recommend, and why?
Show answer
Keep the base lens and add only the lenses that match what is distinctive about the workload: a data analytics lens for the technology pattern and the financial services lens for the industry context, plus a custom lens only if the bank has internal rules the AWS lenses don't cover. Five lenses at once create hundreds of questions, so the session stalls or answers become careless, which hides real risks. Lenses can be added later, once the first ones are answered well and remediated.
Exercise
You attached the Serverless Applications lens to a workload and the Tool now shows 4 high risk items for that lens and 2 for the base lens. The same missing-alarm gap appears in both. How do you handle it in the improvement plan?
Show answer
Treat the missing alarms as one item. Fix it once, track it once, and rank it by risk level and business impact together with all other findings from both lenses. Counting it twice would inflate the workload's apparent risk and duplicate effort. After the fix, update the answers in both lenses and save a milestone.