DVA-C03 Logging, Monitoring and Observability: CloudWatch, EMF, Alarms, X-Ray and Health Checks
Logging, monitoring and observability are the practices that let a developer see what an application is doing: structured logs that record behaviour and state, custom metrics emitted from code, alarms and event rules that notify people about specific actions, traces that follow one request across services, and health checks that keep unhealthy components out of service. For the DVA-C03 exam this means Amazon CloudWatch Logs and metrics (including embedded metric format and metric filters), CloudWatch alarms and Amazon EventBridge with Amazon SNS, AWS X-Ray with OpenTelemetry instrumentation, and health checks on Amazon ECS, Application Load Balancers, Amazon EKS probes, CloudWatch Synthetics and Route 53. This lesson covers all five official skills of Task 4.2.
On this page10 sections
- Structured logging in Lambda: JSON format, log levels and correlation IDs
- Log retention, log destinations and masking sensitive data
- Emitting custom metrics from code: PutMetricData, embedded metric format and dimensions
- Turning log entries into metrics with metric filters
- Configuring CloudWatch alarms that notify reliably and without noise
- Notification alerts for quota limits and deployment completions
- Tracing requests with AWS X-Ray: turning tracing on
- X-Ray annotations, metadata and sampling rules
- Instrumenting with OpenTelemetry, ADOT and the CloudWatch agent
- Monitoring workload health: load balancer checks, container and pod self-checks, and synthetic checks
- Implement structured JSON logging in Lambda with log format, application and system log levels, and correlation IDs that link one request across functions
- Set log retention, choose a Lambda log destination and mask sensitive data with CloudWatch Logs data protection policies
- Emit custom metrics with embedded metric format or PutMetricData, choosing dimensions and resolution correctly, and derive metrics from logs with metric filters
- Build low-noise alarms and notifications for quota utilization and deployment outcomes with CloudWatch, EventBridge and SNS
- Enable and tune AWS X-Ray tracing for API Gateway and Lambda, use annotations and sampling rules, and instrument with OpenTelemetry
- Monitor workload health with ECS and load balancer health checks, Kubernetes liveness, readiness and startup probes, and synthetic checks
Structured logging in Lambda: JSON format, log levels and correlation IDs
Effective application logging means writing structured entries (JSON objects with consistent field names) that record what the application did and the state it was in, so the entries can be filtered, counted and joined later without parsing free text. In AWS Lambda the quickest route is the function's advanced logging controls, which need no code change for supported runtimes and their built-in logging methods (for example Python's logging library or Node.js console methods).
- Log format: Text (the default) or JSON. With JSON, Lambda writes each application entry as a JSON object with fields such as
timestamp,level,messageandrequestId. - Application log level: filters the entries your code writes (TRACE, DEBUG, INFO, WARN, ERROR, FATAL). Setting it to WARN drops TRACE, DEBUG and INFO entries. Lambda applies this filter only when the function uses the JSON log format; with Text format, application entries are not filtered by level.
- System log level: filters the platform records Lambda itself writes (START, END, REPORT and similar). It does not affect application entries.
| Behaviour | What happens |
|---|---|
| The code sets an explicit level on its own logger | The level set in code takes precedence over the function's application log level. To let the function configuration control filtering, have the code read the level from the AWS_LAMBDA_LOG_LEVEL environment variable that Lambda sets from the configured application log level. |
| A JSON entry has a missing or invalid level | Lambda treats it as INFO for filtering. |
| Where the settings live | The function's logging configuration (console, CLI, or LoggingConfig with LogFormat, ApplicationLogLevel and SystemLogLevel in templates). Changing them needs no code change or redeploy of the package. |
Correlation IDs: following one request across functions
To follow one business request through several components, every entry must carry a field that is the same in all of them. Lambda's requestId does not do that job: it is generated for each invocation, so a producer function and the consumer that later processes the same order have different values, and it is also different from the API Gateway request ID that a client sees in an error response.
- Log business keys (order ID, tenant ID, user action) and a correlation ID as top-level JSON keys, and pass the correlation ID along in messages (for example as an SQS message attribute or a field in the body).
- Powertools for AWS Lambda Logger produces structured JSON and can set a
correlation_idon every entry from a path in the event, such ascorrelation_paths.API_GATEWAY_REST(the API Gateway request ID). - CloudWatch Logs Insights discovers fields in JSON events automatically, so a query can filter on
orderIdorcorrelation_idacross several log groups withoutparseexpressions. Writing those queries during an investigation is covered in the root cause analysis lesson (Task 4.1).
Log stream names identify execution environments, not requests, and should not be used to group a request's entries. Never log secrets or credentials; protect personal data with the controls in the next section.
Log retention, log destinations and masking sensitive data
Every log group should have a retention period, the right destination for how the logs are used, and a data protection policy if they can contain personal data. Log groups that Lambda creates default to never expire, which is why storage costs grow every month; setting retention (for example 90 days) makes CloudWatch Logs delete older events automatically with no code or scheduled jobs.
Where Lambda can send its logs
| Destination | Fits when |
|---|---|
| Amazon CloudWatch Logs (default) | You need real-time viewing, Live Tail, Logs Insights queries, metric filters and alarms. |
| Amazon S3 | Long-term, low-cost storage queried occasionally (for example with Amazon Athena) and no real-time needs. Lambda sets up the delivery itself, through a CloudWatch Logs delivery log group, so there is no code and no stream to manage. |
| Amazon Data Firehose | Logs must be streamed on to other tools or services. |
Writing logs to S3 from the function code with PutObject adds latency and code, and a subscription filter to your own Firehose stream adds a stream to operate.
Subscription filters stream copies
A subscription filter sends matching log events, as they arrive, to Kinesis Data Streams, Amazon Data Firehose or a Lambda function. It delivers copies: it never removes or changes what is stored in the log group, and it does not process events that were ingested before it existed.
Masking sensitive data
A CloudWatch Logs data protection policy, attached to a log group or to the account, uses managed data identifiers (email addresses, credit card numbers, credentials and many others) to find sensitive data. Matching values are masked when people view the events, and only principals allowed logs:Unmask can see the original values. This needs no application change. Encrypting the log group with an AWS KMS key is a different control: it decides whether a principal can read the log group at all, not which fields it sees. Metric filters and subscription filters cannot redact stored events.
Emitting custom metrics from code: PutMetricData, embedded metric format and dimensions
Code can publish custom metrics to CloudWatch in two ways: call the PutMetricData API, or write log entries in CloudWatch embedded metric format (EMF) and let CloudWatch Logs extract the metrics. For high-volume code such as a busy Lambda function, EMF is usually the better choice.
| PutMetricData | Embedded metric format | |
|---|---|---|
| How it works | A synchronous API call per batch of values | A structured JSON log event that declares metric names, units and dimensions next to the values |
| Effect on the request | Adds latency; can be throttled at high call rates | No API call; metrics are extracted asynchronously from the log |
| Detail kept | Only the metric values | The full event stays in the log group for Logs Insights queries |
Libraries such as Powertools for AWS Lambda Metrics and the EMF client libraries write the format for you.
Dimensions define the metric
CloudWatch identifies a metric by its namespace, name and the full set of dimensions. Two consequences matter for developers:
- No cross-dimension aggregation for custom metrics. If a value is published only with the dimensions
EnvironmentandEndpoint, CloudWatch stores it only under that combination; asking for the metric byEnvironmentalone returns no data, and an alarm defined that way stays in INSUFFICIENT_DATA. Every aggregate you want to graph or alarm on must be published as its own dimension set (one EMF event can declare several dimension sets), or computed with metric math over the published metrics. - Every unique combination of dimension values is a separate, billed custom metric. A high-cardinality dimension such as an order ID or user ID creates a new metric for every value. Keep such identifiers as ordinary top-level fields in the EMF event: fields not declared as dimensions or metrics stay in the log and can still be filtered in Logs Insights.
Resolution and fast alarms
Custom metrics are standard resolution (one-minute granularity) unless published with StorageResolution set to 1, which makes them high resolution with one-second data. Resolution is decided at publish time, not by how often values are sent. Alarms on high-resolution metrics can use periods of 10, 20 or 30 seconds (or any multiple of 60); a sub-minute period makes it a high-resolution alarm, which costs more. Fast detection needs both the high-resolution metric and the short alarm period.
For built-in aggregates without custom code, CloudWatch Lambda Insights and Container Insights collect runtime and container metrics, but they do not replace business metrics such as basket size per sales channel.
Turning log entries into metrics with metric filters
A metric filter turns matching log events into a CloudWatch metric, which is how you count or alarm on something the application already logs without changing its code. For JSON logs the filter pattern selects a field, for example { $.level = "ERROR" }; each match publishes a value (often 1, or a number taken from the event), and an alarm on the Sum over a period gives a count-based alert. The selector must name the JSON property that actually holds the value being tested, using the same spelling and nesting as the log event (for example $.http.status for a nested status code).
- Metric filters only see new events. They evaluate events as they are ingested and never backfill data that was already in the log group. For a one-time historical count, run a CloudWatch Logs Insights query.
- Sparse events need a default value. When nothing matches in a period, a filter publishes nothing, so an alarm on a rare error sees missing data. Setting the filter's default value to 0 publishes a zero for periods with log activity but no match; alternatively treat missing data as not breaching on the alarm.
| Tool | What it does |
|---|---|
| Metric filter | Counts or extracts values from new events into a metric you can alarm on |
| Subscription filter | Streams matching new events to Kinesis Data Streams, Firehose or Lambda; it does not count |
| Logs Insights query | Searches and aggregates stored events on demand, including history |
Configuring CloudWatch alarms that notify reliably and without noise
A useful alarm evaluates the right metric, treats missing data deliberately, combines signals where one alone is noisy, and can actually deliver to its Amazon SNS topic. Alarm states are OK, ALARM and INSUFFICIENT_DATA, and the alarm action (usually an SNS topic in the same Region as the alarm) runs on state changes.
Missing data treatment
| TreatMissingData | Missing points are | Fits |
|---|---|---|
missing (default) | Not considered; the alarm can go to INSUFFICIENT_DATA | Metrics that should always report |
notBreaching | Treated as within the threshold (good) | Metrics published only when something goes wrong, such as failure counts |
breaching | Treated as over the threshold (bad) | A heartbeat metric whose absence means the system is down |
ignore | Skipped; the alarm keeps its current state | Metrics with occasional gaps that should not change state |
Composite alarms
A composite alarm has a rule expression over the states of other alarms, joined with AND, OR and NOT. It reduces alarm noise by notifying only when a combination of conditions holds, for example a queue backlog alarm AND a consumer-error alarm. The notification action goes on the composite alarm; the underlying alarms usually have no actions of their own but keep evaluating, so they still show on dashboards and in alarm history. A single metric alarm evaluates one metric or one metric math expression, so a rule over the states of several alarms needs a composite alarm.
Encrypted SNS topics
When an SNS topic uses server-side encryption, the publishing service must be allowed to use the KMS key. The key policy of the AWS managed key aws/sns cannot be edited, so CloudWatch (cloudwatch.amazonaws.com) and EventBridge (events.amazonaws.com) cannot publish to a topic encrypted with it. Encrypt the topic with a customer managed key whose key policy allows those service principals kms:GenerateDataKey* and kms:Decrypt, in addition to the topic policy allowing sns:Publish. Alarms do not run under an execution role of their own.
Notification alerts for quota limits and deployment completions
Alerts for specific actions are built from two AWS mechanisms: CloudWatch alarms on usage metrics for quota limits, and Amazon EventBridge rules on state-change events for things that happen, such as a deployment finishing. Both usually target an SNS topic for email or chat delivery.
Quota limits
- For quotas that support it, the Service Quotas console creates a CloudWatch alarm on the quota's utilization at a threshold you choose (for example 75% of the running On-Demand EC2 instance vCPU quota); add an SNS action to get notified before throttling starts.
- In templates, use metric math on a usage metric from the
AWS/Usagenamespace:(m1 / SERVICE_QUOTA(m1)) * 100gives utilization as a percentage. BecauseSERVICE_QUOTA()returns the currently applied quota, a percentage threshold keeps its meaning after the quota is raised. - AWS Budgets alerts track spend, not quotas, and throttling errors only show up after the limit has been reached.
Deployment completions and failures
| Service | EventBridge event | Notes |
|---|---|---|
| AWS CodeDeploy | CodeDeploy Deployment State-change Notification (states such as SUCCESS, FAILURE) | A rule can match every application and deployment group in the Region, or be narrowed by fields in the event detail. CodeDeploy triggers also notify SNS but are configured per deployment group. |
| AWS CodePipeline | CodePipeline Pipeline Execution State Change (SUCCEEDED, FAILED and others) | Reports the outcome of the whole run; stage and action state-change events give finer detail. |
| Amazon ECS | ECS Deployment State Change, such as SERVICE_DEPLOYMENT_FAILED | Sent for rolling deployments only when the service's deployment circuit breaker is turned on; with rollback enabled, ECS also returns to the last completed revision. |
For ECS the two pieces depend on each other: without the circuit breaker a failing rolling deployment keeps trying to launch tasks and no deployment-failed event is sent. How the deployments themselves are configured is covered in the CI/CD lesson (Task 3.3).
Tracing requests with AWS X-Ray: turning tracing on
Tracing records the path and timing of an individual request through each service it touches, which aggregate metrics and per-service logs cannot show. AWS X-Ray stores traces made of segments (one per service) and subsegments or child spans (for example a downstream AWS SDK call), and shows them in the X-Ray and CloudWatch trace views.
| Service | How tracing is enabled |
|---|---|
| API Gateway REST API | Enable X-Ray tracing on the stage; the trace then includes an API Gateway segment. |
| API Gateway HTTP API | No X-Ray tracing support. Traces start at the downstream function, without an API Gateway segment. |
| Lambda (console or CLI) | Turn on active tracing; the console also adds the X-Ray write permissions to the execution role. |
| Lambda (plain CloudFormation) | TracingConfig: Mode: Active on AWS::Lambda::Function, plus xray:PutTraceSegments and xray:PutTelemetryRecords on the execution role (for example through the AWSXRayDaemonWriteAccess managed policy). |
| Lambda (AWS SAM) | Tracing: Active on AWS::Serverless::Function, a SAM-only shortcut that also adds the permissions. |
Lambda sends its segments with the execution role; X-Ray never assumes that role, so no trust-policy change is needed. PassThrough mode only traces requests that an upstream service has already sampled; Active makes Lambda sample and trace invocations itself. To see time spent inside your code's downstream calls, instrument the code so AWS SDK and HTTP calls produce subsegments or child spans (see the OpenTelemetry section).
X-Ray annotations, metadata and sampling rules
Annotations are indexed key-value pairs that make traces searchable; metadata is unindexed context attached to a trace; sampling rules decide which requests are traced.
| Annotations | Metadata | |
|---|---|---|
| Content | Simple key-value pairs (string, number, Boolean) | Any value, including objects and lists |
| Indexed | Yes, usable in filter expressions such as annotation.tenant_id = "t-42" | No; visible when you open a trace |
| Use for | Values you will search by: tenant ID, customer tier, order type | Extra debugging context you only read |
With OpenTelemetry instrumentation, span attributes are stored as X-Ray metadata unless their keys are configured to be converted to annotations. X-Ray filter expressions search what X-Ray indexes in the traces themselves (annotations, service names, response times, HTTP status and similar); data held elsewhere, such as in logs, is searched with the tool that stores it.
Centralized sampling rules
X-Ray does not trace every request by default. Centralized sampling rules are defined in X-Ray and fetched by the instrumentation (SDK, ADOT, CloudWatch agent or collector), so they change without redeploying code. Each rule matches requests (service name, HTTP method, URL path and so on) and has:
- a priority: rules are evaluated from the lowest number up, and the default rule always comes last;
- a reservoir: the number of matching requests traced each second;
- a fixed rate: the share of matching requests beyond the reservoir that is traced.
The default rule traces the first request each second and 5% of the rest. To trace every request on one path while leaving others at the default, add a higher-priority rule for that path with a fixed rate of 1.0. Raising the default rule's rate affects every path, and a reservoir smaller than the traffic still leaves gaps. Local sampling rules files ship with the application and need a redeploy to change.
Instrumenting with OpenTelemetry, ADOT and the CloudWatch agent
For new and existing applications, AWS now recommends instrumenting with OpenTelemetry: an OpenTelemetry SDK or the AWS Distro for OpenTelemetry (ADOT) in the code, sending OTLP spans to the CloudWatch agent or an OpenTelemetry collector, which exports them to X-Ray. The X-Ray SDKs and the X-Ray daemon entered maintenance mode on 25 February 2026 (security fixes only). X-Ray as a service, its trace views, sampling rules, annotations, and Lambda and API Gateway tracing remain current; only the X-Ray-specific instrumentation libraries and daemon are being superseded.
- On Amazon ECS (including AWS Fargate), run the CloudWatch agent or an OpenTelemetry collector as a sidecar container in the task, and point the application's exporter at it.
- Auto-instrumentation in OpenTelemetry SDKs records AWS SDK and HTTP calls as child spans, which become subsegments in X-Ray.
- The X-Ray daemon receives X-Ray segment documents over UDP and does not accept OTLP; OpenTelemetry exporters send to the CloudWatch agent or a collector instead.
- Container Insights collects container metrics and logs; it does not trace requests.
Which role needs the X-Ray permissions
| Role | Used by |
|---|---|
| Task role | The application and sidecar containers when they call AWS APIs. The collector's xray:PutTraceSegments (plus the sampling and telemetry permissions) goes here. |
| Task execution role | ECS itself: pulling images from ECR, fetching secrets, sending container logs. |
| ECS service-linked role | ECS managing the service (load balancer registration, networking). |
Every AWS API call made by code running in the task, including a sidecar, is authorized against the task role, so permissions an application or agent needs at run time belong on that role.
Monitoring workload health: load balancer checks, container and pod self-checks, and synthetic checks
Workload health is monitored at three levels: load balancer health checks test each target from the network, container and pod self-checks (ECS container health checks, Kubernetes probes) test the process from inside, and outside-in checks (CloudWatch Synthetics canaries, Route 53 health checks) test what users actually reach.
Load balancer health checks
| Setting | What it does |
|---|---|
| Target group health check | The load balancer sends requests to a path on each target; an ECS service with a load balancer replaces tasks the target group marks unhealthy. |
Service healthCheckGracePeriodSeconds | Tells the ECS scheduler to ignore load balancer health checks for that long after a task starts, so slow-starting tasks are not replaced during deployments or scale-out. |
| Deregistration delay (target group) | How long the load balancer keeps draining in-flight connections from a target that is being removed. |
Container and pod self-checks
An ECS container healthCheck in the task definition is a command run inside the container, with interval, timeout, retries and startPeriod (time during which failures do not count). Repeated failures mark the container UNHEALTHY, and a service replaces tasks whose essential container is unhealthy. Because it runs a local command, it can detect a process that is still running but no longer doing work, and it needs no load balancer.
Kubernetes, including Amazon EKS, has three probe types:
| Probe | On failure | Use it for |
|---|---|---|
| Liveness | The container is restarted | Detecting a hung or deadlocked process. Keep it shallow: check only the process itself. |
| Readiness | The pod is removed from Service endpoints, without a restart | Temporary inability to serve (warming a cache, a dependency briefly unavailable) |
| Startup | Liveness and readiness are held off until it succeeds; if it never succeeds the container is restarted | Slow or variable start times |
Putting a shared dependency, such as a database, in the liveness check turns a short database failover into a restart of every pod and a long recovery. For a slow start, a startup probe whose failureThreshold × periodSeconds covers the longest start lets the liveness probe keep tight settings once the application is running.
Outside-in checks
- CloudWatch Synthetics canaries are scripts that run on a schedule and can drive a headless browser through multi-step flows (for example search a catalogue, then submit a contact form), publishing success and duration metrics you can alarm on. Because canaries generate their own traffic, they test availability whether or not users are active.
- Route 53 health checks test a single endpoint from several locations. Route 53 publishes their metrics (such as
HealthCheckStatus) to CloudWatch in US East (N. Virginia) only, so the alarm must be created there, and its SNS action must use a topic in that Region too. - CloudWatch RUM collects performance and error data from real users' browser sessions.
Tip. Questions on this task are developer scenarios in which an application must be made observable or a signal is missing or noisy: logs are unstructured, unfiltered, too costly, kept too long or expose personal data; a custom metric adds latency, has no data under the dimensions an alarm uses, is too coarse or creates too many metrics; an alarm never leaves INSUFFICIENT_DATA, pages too often or cannot publish to its topic; a team needs alerts for quota utilization or deployment outcomes; a trace lacks the API Gateway segment, cannot be searched by tenant, misses rare requests or is rejected for permissions; or healthy tasks and pods are restarted while hung ones are not. The deciding detail is usually a service behaviour (which log level wins, what a dimension set identifies, what metric filters process, which Region a metric lives in, which role a sidecar uses, what each probe does on failure) or a stated constraint such as no code change, no redeploy, least operational effort, no load balancer or keeping existing alarms. Multiple-response items often need two settings that work together, such as a tracing mode plus role permissions or a circuit breaker plus an event rule.
- Lambda's JSON log format plus an application log level gives structured, level-filtered logs with no code change (level filtering applies only with JSON format), but a level set in code takes precedence; the system log level filters only Lambda's platform records.
- Lambda's requestId is per invocation; link a request across components with a shared correlation ID or business key logged as a top-level JSON field.
- Lambda log groups never expire by default: set retention. Send logs to S3 for cheap long-term storage, CloudWatch Logs for real-time use, Firehose for streaming on.
- Data protection policies mask sensitive values on view and logs:Unmask reveals them; KMS encryption controls access to the whole log group, and filters never redact.
- Embedded metric format emits custom metrics from logs with no API calls; every unique dimension combination is a separate metric, CloudWatch does not aggregate across dimensions, and IDs belong in fields, not dimensions.
- Sub-minute alerting needs StorageResolution 1 and a 10, 20 or 30-second alarm period; metric filters only count new events and need a default value of 0 for sparse matches.
- Use notBreaching for metrics published only on failure, composite alarms to page on combined conditions, and a customer managed key for SNS topics that alarms or EventBridge publish to.
- Quota alerts: Service Quotas console alarms or usage / SERVICE_QUOTA() metric math. Deployment alerts: EventBridge state-change rules for CodeDeploy, CodePipeline and ECS (SERVICE_DEPLOYMENT_FAILED needs the circuit breaker).
- X-Ray tracing works on API Gateway REST stages and Lambda active tracing (TracingConfig Mode: Active plus PutTraceSegments and PutTelemetryRecords on the execution role); HTTP APIs have no X-Ray support. Annotations are indexed, metadata is not.
- Instrument new code with OpenTelemetry or ADOT and the CloudWatch agent or a collector (X-Ray SDKs and daemon are in maintenance mode); keep liveness checks shallow, use readiness for temporary unavailability and startup probes for slow starts.
Frequently asked questions
Why do DEBUG or INFO logs still appear after I set a Lambda function's application log level to WARN?
The level your code sets on its own logger takes precedence over the function's application log level, so an explicit level in code keeps lower-level entries flowing. Remove the explicit level, or have the code read the AWS_LAMBDA_LOG_LEVEL environment variable that Lambda sets, so the function's configuration controls filtering. Lambda filters application logs by level only when the function uses the JSON log format, for supported runtimes and their built-in logging methods.
What is CloudWatch embedded metric format and when should I use it instead of PutMetricData?
Embedded metric format (EMF) is a JSON log structure that declares metric names, units and dimensions alongside the values, and CloudWatch Logs extracts the metrics asynchronously. Use it in high-volume code such as Lambda functions: it avoids a synchronous PutMetricData call per request, so there is no added latency or API throttling, and the full event stays in the logs for queries. Keep high-cardinality values such as order IDs as plain fields, not dimensions, because every unique dimension combination becomes a separate billed metric.
Why is my CloudWatch alarm stuck in INSUFFICIENT_DATA?
Usually the alarm watches a metric that has no data points. Common causes are an alarm on a dimension set the application never publishes (CloudWatch does not aggregate custom metrics across dimensions), a metric filter that publishes nothing because no events matched, and a metric reported only when something fails. Fix the dimensions, give the metric filter a default value of 0, or set the alarm's missing data treatment to notBreaching when no data really means no problem.
What is the difference between X-Ray annotations and metadata?
Annotations are simple key-value pairs that AWS X-Ray indexes, so you can find traces with filter expressions such as annotation.tenant_id = "t-42". Metadata can hold any value, including objects, but is not indexed and is only visible when you open a trace. Record values you will search by, such as a tenant or customer ID, as annotations. With OpenTelemetry, span attributes become metadata unless their keys are configured as annotations.
Is the AWS X-Ray SDK still the recommended way to instrument an application?
No. The X-Ray SDKs and the X-Ray daemon entered maintenance mode on 25 February 2026 and receive only security fixes. AWS recommends OpenTelemetry SDKs or AWS Distro for OpenTelemetry, sending spans to the CloudWatch agent or an OpenTelemetry collector that exports them to X-Ray. X-Ray itself, its sampling rules and annotations, and Lambda and API Gateway tracing remain current.
How do I get notified when an AWS deployment succeeds or fails?
Create an Amazon EventBridge rule that matches the service's state-change events and targets an Amazon SNS topic. CodeDeploy emits deployment state-change notifications, CodePipeline emits pipeline execution state changes, and Amazon ECS emits SERVICE_DEPLOYMENT_FAILED when a rolling deployment fails with the deployment circuit breaker turned on. One rule covers all current and future applications, unlike per-deployment-group CodeDeploy triggers.
What is the difference between a liveness probe and a readiness probe?
In Kubernetes, including Amazon EKS, a failed liveness probe restarts the container, while a failed readiness probe only removes the pod from Service endpoints until it passes again. Use liveness to recover a hung process and keep it shallow, checking only the process itself. Use readiness for temporary inability to serve, such as a reload or a briefly unavailable dependency, and a startup probe to give slow-starting applications time before the other probes begin.
Why can't I find Route 53 health check metrics in my Region?
Amazon Route 53 publishes health check metrics such as HealthCheckStatus to Amazon CloudWatch only in the US East (N. Virginia) Region, whatever Region the application runs in. Create the CloudWatch alarm in US East (N. Virginia), and use an SNS topic in that same Region as its notification action.
Source
This lesson covers the "Troubleshooting and Optimization" domain of the official DVA-C03 exam guide. Vendors revise their guides — check the source for the current version.
- AWS Certified Developer – Associate (DVA-C03) exam guide — Amazon Web Services
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.