AWS::ObservabilityAdmin::TelemetryEnrichment starts resource tags for telemetry in the stack's Region and stops it on delete. Scope must be ACCOUNT; Ref returns it and Status is RUNNING. AWS::CloudWatch::OTelEnrichment starts OTel enrichment with its filters, updates them in place as UpdateOTelEnrichment does (a dropped list is cleared), and stops it on delete. An update writes the filters when the template changes them or when they resolve to other values than the running ones, as a Ref to a resource the update replaces does. Ref and AccountId are the account, Status is RUNNING, and a failed stack update puts the previous filters back. Both are singletons: a create while the feature already runs fails with AlreadyExists, as the CloudFormation handler contract requires, and the check and the start hold one lock. Properties go through template validation, then the schema's model validation, with the two types added to the vendored property types. The vendored schema data is regenerated from AWS's current archive, which adds AvailabilityZoneId to AWS::EC2::Instance (recorded as a writable gap, since the instance provisioner does not read it) and an EBS Throughput, and drops ElasticGpuSpecifications and ElasticInferenceAccelerators, whose gap rows go.
4.6 KiB
CloudWatch Observability Admin
Floci implements the REST JSON API of CloudWatch Observability Admin for the resource tags for telemetry feature, which CloudWatch's OpenTelemetry enrichment reads resource tags through. Requests are signed for observabilityadmin and served at the same endpoint as every other service.
Supported Actions
| Action | Description |
|---|---|
StartTelemetryEnrichment |
Starts resource tags for telemetry in the Region, creating its Resource Explorer managed view the first time. |
StopTelemetryEnrichment |
Stops resource tags for telemetry in the Region. |
GetTelemetryEnrichmentStatus |
Returns the feature's status, and its managed view's ARN while it runs. |
Behavior
- The feature is one switch per account and Region.
StartTelemetryEnrichmentanswers202withStatusRunningand the ARN of its Resource Explorer managed view,StopTelemetryEnrichmentanswers202withStatusStopped, andGetTelemetryEnrichmentStatusanswers the currentStatuswith the view's ARN while the feature runs, as the output's documentation gives it "if the feature is enabled". - Starting the feature has Resource Explorer create "an AWS index and managed view that indexes and discovers resources and tags in your account", as the CloudWatch user guide's "Resource tags for telemetry" says. The index is a
LOCALone, created only when the Region has none, and the view includes thetagsproperty.resource-explorer-2serves the view:GetManagedViewanswers it andListManagedViewslists it. - AWS documents the view but not its name, so Floci names it
AWSManagedViewForResourceTagsForTelemetry, in the form of the one managed view the Resource Explorer guide names,AWSManagedViewForSSM. Its ARN isarn:<partition>:resource-explorer-2:<region>:<account>:managed-view/AWSManagedViewForResourceTagsForTelemetry/<uuid>. ItsTrustedServiceistelemetry-enablement.observabilityadmin.amazonaws.com, the principal of the service-linked role whose policy (AWSObservabilityAdminTelemetryEnablementServiceRolePolicy) grants the featureresource-explorer-2:CreateManagedView. - The view outlives a stop: a feature stopped and started again answers the view its first start created.
- CloudWatch's
StartOTelEnrichmentwith resource tag enrichment needs the feature running in the same Region; see OTel enrichment. Stopping the feature leaves CloudWatch enrichment that already runs as it is. GetTelemetryEnrichmentStatusfor a feature never started in the Region answersResourceNotFoundException(404), the operation's modeled answer before the first start. Stopping a feature that is stopped, or was never started, answersStoppedand changes nothing, so a feature never started still reads as never started.- CloudFormation's
AWS::ObservabilityAdmin::TelemetryEnrichmentstarts the feature in the stack's Region when it is created and stops it when it is deleted.Scopemust beACCOUNT, the only value AWS supports;Refreturns it andStatusreturnsRUNNING. A create while the feature already runs fails withAlreadyExists, as CloudFormation's resource handler contract requires of a create. - Floci changes the feature's state at once, so it is never caught between
RunningandStopped, is neverImpaired, and no request answersConflictException.
IAM
Under IAM enforcement (floci.services.iam.enforcement-enabled), each request is checked as its observabilityadmin: action, from the routes and request resources generated from botocore and the AWS Service Reference. The three actions act on no resource type and are checked on *. A refusal is AccessDeniedException with the 400 status the model declares for the service.
Not implemented
Telemetry rules, telemetry evaluation, centralization rules, telemetry pipelines, S3 table integrations, dataset integrations, third-party telemetry enrichment and resource telemetry listing are not emulated yet. Starting the feature does not grant Resource Explorer streaming access to a service.
Example
export AWS_ENDPOINT_URL=http://localhost:4566
aws observabilityadmin start-telemetry-enrichment
aws observabilityadmin get-telemetry-enrichment-status
aws resource-explorer-2 get-managed-view --managed-view-arn "$(aws observabilityadmin \
get-telemetry-enrichment-status --query AwsResourceExplorerManagedViewArn --output text)"
aws observabilityadmin stop-telemetry-enrichment