diff --git a/README.md b/README.md
index 3800690d9e..66ff7d24c7 100644
--- a/README.md
+++ b/README.md
@@ -232,7 +232,7 @@ Floci supports local emulation for application services, data services, eventing
| Category | Services |
|---|---|
| Core app services | S3, SQS, SNS, DynamoDB, Lambda, IAM, KMS, Secrets Manager, SSM |
-| Events and workflows | EventBridge, EventBridge Pipes, EventBridge Scheduler, Step Functions, SWF, CloudWatch Logs, CloudWatch Metrics, CloudWatch RUM, Managed Prometheus (AMP) |
+| Events and workflows | EventBridge, EventBridge Pipes, EventBridge Scheduler, Step Functions, SWF, CloudWatch Logs, CloudWatch Metrics, CloudWatch OAM, CloudWatch RUM, Managed Prometheus (AMP) |
| API and identity | API Gateway REST, API Gateway v2, AppSync, Cognito, ACM, Route53, Route 53 Resolver, Cloud Map, Global Accelerator |
| Containers and compute | ECS, EC2, Lightsail, EKS, MWAA, ECR, EFS, CodeBuild, CodeDeploy, CodePipeline, CodeGuru Reviewer, AWS Batch, Auto Scaling, Application Auto Scaling, Elastic Beanstalk, ELB v2, ELB Classic |
| Data, analytics, and AI | Athena, Glue, Lake Formation, EMR, EMR Serverless, Redshift, Redshift Data API, Firehose, Managed Service for Apache Flink, OpenSearch, S3 Tables, S3 Vectors, Textract, Transcribe, Comprehend, Rekognition, Translate, Bedrock, Bedrock Runtime, Bedrock AgentCore |
@@ -272,6 +272,7 @@ For operation-level compatibility, see the [Services Overview](https://floci.io/
| EventBridge Scheduler | In-process | Schedule groups, schedules, flexible time windows, retry policies, DLQs |
| CloudWatch Logs | In-process | Log groups, streams, ingestion, filtering |
| CloudWatch Metrics | In-process | Custom metrics, statistics, alarms |
+| CloudWatch OAM | In-process | Full 15-operation sink, policy, cross-account link, and tagging API |
| ElastiCache | Real Docker | Redis / Valkey protocol, IAM auth, SigV4 validation |
| MemoryDB | Real Docker | Redis / Valkey protocol via real containers; JSON 1.1 control plane; reuses ElastiCache RESP proxy |
| RDS | Real Docker | PostgreSQL, MySQL, MariaDB, IAM auth, JDBC-compatible engines |
diff --git a/compatibility-tests/sdk-test-java/pom.xml b/compatibility-tests/sdk-test-java/pom.xml
index 334324f35c..3f0d2288fb 100644
--- a/compatibility-tests/sdk-test-java/pom.xml
+++ b/compatibility-tests/sdk-test-java/pom.xml
@@ -512,6 +512,11 @@
software.amazon.awssdk
resourceexplorer2
+
+
+ software.amazon.awssdk
+ oam
+
software.amazon.awssdk
diff --git a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
index 5896826697..baa8938f2f 100644
--- a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
+++ b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
@@ -26,6 +26,7 @@ import software.amazon.awssdk.http.Protocol;
import software.amazon.awssdk.services.kms.KmsClient;
import software.amazon.awssdk.services.lambda.LambdaClient;
import software.amazon.awssdk.services.opensearch.OpenSearchClient;
+import software.amazon.awssdk.services.oam.OamClient;
import software.amazon.awssdk.services.neptune.NeptuneClient;
import software.amazon.awssdk.services.rds.RdsClient;
import software.amazon.awssdk.services.redshift.RedshiftClient;
@@ -1294,6 +1295,14 @@ public final class TestFixtures {
.build();
}
+ public static OamClient oamClient() {
+ return OamClient.builder()
+ .endpointOverride(ENDPOINT)
+ .region(REGION)
+ .credentialsProvider(CREDENTIALS)
+ .build();
+ }
+
public static ResourceExplorer2Client resourceExplorer2Client() {
return resourceExplorer2Client(REGION);
}
diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/OamTest.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/OamTest.java
new file mode 100644
index 0000000000..4b015403c9
--- /dev/null
+++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/OamTest.java
@@ -0,0 +1,28 @@
+package com.floci.test;
+
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.oam.OamClient;
+import software.amazon.awssdk.services.oam.model.CreateSinkRequest;
+import software.amazon.awssdk.services.oam.model.DeleteSinkRequest;
+import software.amazon.awssdk.services.oam.model.GetSinkRequest;
+import software.amazon.awssdk.services.oam.model.ListSinksRequest;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class OamTest {
+ @Test
+ void sinkLifecycle() {
+ try (OamClient client = TestFixtures.oamClient()) {
+ var created = client.createSink(CreateSinkRequest.builder().name("sdk-oam-sink").build());
+ assertNotNull(created.arn());
+ assertEquals("sdk-oam-sink", created.name());
+
+ var fetched = client.getSink(GetSinkRequest.builder().identifier(created.arn()).build());
+ assertEquals(created.arn(), fetched.arn());
+ assertTrue(client.listSinks(ListSinksRequest.builder().build()).items().stream()
+ .anyMatch(item -> created.arn().equals(item.arn())));
+
+ client.deleteSink(DeleteSinkRequest.builder().identifier(created.arn()).build());
+ }
+ }
+}
diff --git a/docs/services/index.md b/docs/services/index.md
index ac898c1320..7d0986233b 100644
--- a/docs/services/index.md
+++ b/docs/services/index.md
@@ -41,6 +41,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
| [EventBridge](eventbridge.md) | `POST /` + `X-Amz-Target: AmazonEventBridge.*` | JSON 1.1 | 16 |
| [EventBridge Scheduler](scheduler.md) | `/schedules/*`, `/schedule-groups/*`, `/tags/*` | REST JSON | 12 |
| [EventBridge Pipes](pipes.md) | `/v1/pipes/*` | REST JSON | 7 |
+| [CloudWatch OAM](oam.md) | REST paths such as `POST /CreateSink` and `POST /CreateLink` | REST JSON | 15 |
| [CloudWatch Logs](cloudwatch.md) | `POST /` + `X-Amz-Target: Logs.*` | JSON 1.1 | 17 |
| [CloudWatch Metrics](cloudwatch.md#metrics) | `POST /` with `Action=` or JSON 1.1 | Query / JSON | 11 |
| [CloudWatch RUM](rum.md) | `/appmonitor`, `/appmonitor/{name}`, `/appmonitors` | REST JSON | 5 |
diff --git a/docs/services/oam.md b/docs/services/oam.md
new file mode 100644
index 0000000000..3d047d9458
--- /dev/null
+++ b/docs/services/oam.md
@@ -0,0 +1,85 @@
+# CloudWatch Observability Access Manager (`oam:*`)
+
+**Protocol:** REST JSON
+**Signing name:** `oam`
+**API version:** `2022-06-10`
+
+Floci emulates the CloudWatch Observability Access Manager control plane for cross-account observability links. Sinks and links are account and Region scoped, and attached-link discovery crosses source-account storage partitions in the same way the AWS API exposes source links to a monitoring sink.
+
+## Supported operations
+
+| Operation | Notes |
+|---|---|
+| `CreateSink` | Creates the single sink allowed for the calling account and Region |
+| `GetSink` | Returns one sink by ARN |
+| `ListSinks` | Lists sinks for the calling account and Region |
+| `PutSinkPolicy` | Stores and validates the sink resource policy |
+| `GetSinkPolicy` | Returns the current policy for a sink |
+| `DeleteSink` | Rejects deletion while links remain attached |
+| `CreateLink` | Creates a source-account link after evaluating the sink policy |
+| `GetLink` | Returns one source-account link |
+| `ListLinks` | Lists links owned by the calling source account |
+| `ListAttachedLinks` | Lists links from all source accounts attached to a sink |
+| `UpdateLink` | Replaces shared resource types and optional metric/log filters |
+| `DeleteLink` | Deletes a source-account link |
+| `ListTagsForResource` | Returns tags for a sink or link |
+| `TagResource` | Adds or replaces tags on a sink or link |
+| `UntagResource` | Removes tag keys from a sink or link |
+
+## Sink policies
+
+`PutSinkPolicy` accepts IAM-style JSON policies. For `CreateLink`, Floci evaluates the policy's `Effect`, `Principal`, `Action`, `Resource`, and the `oam:ResourceTypes` condition. Individual account principals, account root ARNs, wildcard principals, exact sink ARNs, and wildcard resources are supported.
+
+Organization-based conditions are not currently resolved through AWS Organizations metadata. Policies that depend on organization condition keys should use explicit account principals when testing locally.
+
+## Resource types and filters
+
+Floci accepts the resource types modeled by the current OAM API:
+
+- `AWS::CloudWatch::Metric`
+- `AWS::Logs::LogGroup`
+- `AWS::XRay::Trace`
+- `AWS::ApplicationInsights::Application`
+- `AWS::InternetMonitor::Monitor`
+- `AWS::ApplicationSignals::Service`
+- `AWS::ApplicationSignals::ServiceLevelObjective`
+
+Metric and log-group filters are persisted with the link. Updating a filter to `*` removes that filter, matching the AWS update contract.
+
+## Quotas and validation
+
+- One sink per account per Region.
+- Up to five links per source account per Region.
+- `ListSinks` accepts `MaxResults` from 1 to 100.
+- `ListLinks` accepts `MaxResults` from 1 to 5.
+- `ListAttachedLinks` accepts `MaxResults` from 1 to 1000.
+- A sink cannot be deleted while links are attached.
+- Sinks and links support up to 50 tags.
+
+Floci resolves the account-derived label variables to the local account ID because the emulator has no AWS account email/name directory attached to OAM itself.
+
+## Configuration
+
+| Variable | Default | Description |
+|---|---|---|
+| `FLOCI_SERVICES_OAM_ENABLED` | `true` | Enable or disable OAM |
+
+## Example
+
+```bash
+export AWS_ENDPOINT_URL=http://localhost:4566
+export AWS_DEFAULT_REGION=us-east-1
+export AWS_ACCESS_KEY_ID=test
+export AWS_SECRET_ACCESS_KEY=test
+
+sink_arn=$(aws oam create-sink --name local-observability --query Arn --output text)
+
+aws oam put-sink-policy \
+ --sink-identifier "$sink_arn" \
+ --policy '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":"*","Action":"oam:CreateLink","Resource":"*"}]}'
+
+aws oam create-link \
+ --sink-identifier "$sink_arn" \
+ --label-template local-source \
+ --resource-types AWS::CloudWatch::Metric AWS::Logs::LogGroup
+```
diff --git a/mkdocs.yml b/mkdocs.yml
index f42f797d54..b45cca9cf7 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -154,6 +154,7 @@ nav:
- EventBridge Pipes: services/pipes.md
- EventBridge Scheduler: services/scheduler.md
- CloudWatch: services/cloudwatch.md
+ - CloudWatch OAM: services/oam.md
- CloudWatch RUM: services/rum.md
- Managed Prometheus (AMP): services/managed-prometheus.md
- GuardDuty: services/guardduty.md
diff --git a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
index 1c1646d949..0aa7eb9e72 100644
--- a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
+++ b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
@@ -703,6 +703,7 @@ public interface EmulatorConfig {
CostExplorerServiceConfig ce();
CurServiceConfig cur();
BcmDataExportsServiceConfig bcmDataExports();
+ OamServiceConfig oam();
ConfigServiceConfig configservice();
CloudTrailServiceConfig cloudtrail();
CloudControlServiceConfig cloudcontrol();
@@ -1922,6 +1923,11 @@ public interface EmulatorConfig {
int schemaWorkerShutdownTimeoutSeconds();
}
+ interface OamServiceConfig {
+ @WithDefault("true")
+ boolean enabled();
+ }
+
interface BcmDataExportsServiceConfig {
@WithDefault("true")
boolean enabled();
diff --git a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
index 9ef752f4b9..bb70d135b9 100644
--- a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
+++ b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
@@ -29,6 +29,7 @@ import io.github.hectorvent.floci.services.lambda.LambdaController;
import io.github.hectorvent.floci.services.lambdamicrovms.LambdaMicrovmsController;
import io.github.hectorvent.floci.services.lambdamicrovms.LambdaNetworkConnectorsController;
import io.github.hectorvent.floci.services.opensearch.OpenSearchController;
+import io.github.hectorvent.floci.services.oam.OamController;
import io.github.hectorvent.floci.services.cloudfront.CloudFrontController;
import io.github.hectorvent.floci.services.cloudfront.CloudFrontServingController;
import io.github.hectorvent.floci.services.route53.Route53Controller;
@@ -558,6 +559,10 @@ public class ResolvedServiceCatalog {
"bcmdataexports", config.storage().mode(), 5000L, null, ServiceProtocol.JSON,
protocols(ServiceProtocol.JSON),
Set.of("AWSBillingAndCostManagementDataExports."), Set.of("bcm-data-exports"), Set.of(), Set.of()),
+ descriptor("oam", "oam", config.services().oam().enabled(), true,
+ "oam", config.storage().mode(), 5000L, null, ServiceProtocol.REST_JSON,
+ protocols(ServiceProtocol.REST_JSON),
+ Set.of(), Set.of("oam"), Set.of(), Set.of(OamController.class)),
descriptor("cloudfront", "cloudfront", config.services().cloudfront().enabled(), true,
"cloudfront", storageMode(config.storage().services().cloudfront().mode(), config.storage().mode()),
5000L, AwsNamespaces.CLOUDFRONT, ServiceProtocol.REST_XML,
diff --git a/src/main/java/io/github/hectorvent/floci/services/oam/OamController.java b/src/main/java/io/github/hectorvent/floci/services/oam/OamController.java
new file mode 100644
index 0000000000..f9dfdf6126
--- /dev/null
+++ b/src/main/java/io/github/hectorvent/floci/services/oam/OamController.java
@@ -0,0 +1,209 @@
+package io.github.hectorvent.floci.services.oam;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.github.hectorvent.floci.core.common.AwsException;
+import io.github.hectorvent.floci.core.common.RegionResolver;
+import io.github.hectorvent.floci.services.oam.model.OamLink;
+import io.github.hectorvent.floci.services.oam.model.OamSink;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+@Path("/")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class OamController {
+ private final OamService service;
+ private final RegionResolver regionResolver;
+ private final ObjectMapper objectMapper;
+
+ @Inject
+ public OamController(OamService service, RegionResolver regionResolver, ObjectMapper objectMapper) {
+ this.service = service;
+ this.regionResolver = regionResolver;
+ this.objectMapper = objectMapper;
+ }
+
+ @POST @Path("/CreateSink")
+ public Response createSink(@Context HttpHeaders headers, Map request) {
+ OamSink sink = service.createSink(string(request, "Name"), stringMap(request.get("Tags")), region(headers));
+ return Response.ok(sinkBody(sink, true)).build();
+ }
+
+ @POST @Path("/GetSink")
+ public Response getSink(Map request) {
+ OamSink sink = service.getSink(string(request, "Identifier"));
+ return Response.ok(sinkBody(sink, boolDefaultTrue(request, "IncludeTags"))).build();
+ }
+
+ @POST @Path("/ListSinks")
+ public Response listSinks(@Context HttpHeaders headers, Map request) {
+ int max = maxResults(request, 100, 100);
+ int start = OamService.decodeToken(string(request, "NextToken"));
+ List all = service.listSinks(region(headers));
+ int end = Math.min(start + max, all.size());
+ List