New: OpenStreetMap planet and diff notifications via AWS SNS subscription

Now in BETA: The OpenStreetMap planet exports including minutely, hourly, and daily diffs are now being announced via Amazon Simple Notification Service (AWS SNS). This allows AWS users to trigger their own workflows as soon as new OpenStreetMap data becomes available.

OpenStreetMap Planet S3 Event Notifications via SNS technical detail

These SNS topics allow users to subscribe to notifications when objects are created or deleted in the OSM Planet buckets. This is useful for applications that need to know when new data is available.

Subscription is public but restricted to SQS, Lambda, HTTP, and HTTPS protocols to prevent spam and control costs. Anyone with the topic ARN can subscribe using these protocols.

SNS Topic ARNs

  • EU Central (Frankfurt):
    arn:aws:sns:eu-central-1:630658470130:osm-planet-eu-central-1-notifications
  • US West (Oregon):
    arn:aws:sns:us-west-2:630658470130:osm-planet-us-west-2-notifications

To subscribe to these topics programmatically

  • Use the AWS SDK or CLI with the topic ARN
  • For HTTP/HTTPS endpoints, implement endpoint validation
  • For SQS queues, ensure proper permissions are in place
  • For Lambda functions, configure the function to accept SNS events

Example AWS CLI subscription command

aws sns subscribe \
   --topic-arn arn:aws:sns:eu-central-1:630658470130:osm-planet-eu-central-1-notifications \
   --protocol https --notification-endpoint https://example.com/notifications

An example SNS notification

Example announcement for a new changesets/replication/minute/state.yaml file, the Message block being the key section.

{
  "Type" : "Notification",
  "MessageId" : "443…",
  "TopicArn" : "arn:aws:sns:eu-central-1:630658470130:osm-planet-eu-central-1-notifications",
  "Subject" : "Amazon S3 Notification",
  "Message" : "{\"Records\":[{\"eventVersion\":\"2.1\",\"eventSource\":\"aws:s3\",\"awsRegion\":\"eu-central-1\",\"eventTime\":\"2025-05-06T16:22:28.102Z\",\"eventName\":\"ObjectCreated:Put\",\"userIdentity\":{\"principalId\":\"AWS:AROA…:botocore-session-1746548222\"},\"requestParameters\":{\"sourceIPAddress\":\"82.199.86.113\"},\"responseElements\":{\"x-amz-request-id\":\"2MR6…\",\"x-amz-id-2\":\"wvhLrhEvqJChQE53kz/G…\"},\"s3\":{\"s3SchemaVersion\":\"1.0\",\"configurationId\":\"tf-s3-topic-2025050…\",\"bucket\":{\"name\":\"osm-planet-eu-central-1\",\"ownerIdentity\":{\"principalId\":\"A2M…\"},\"arn\":\"arn:aws:s3:::osm-planet-eu-central-1\"},\"object\":{\"key\":\"changesets/replication/minute/state.yaml\",\"size\":69,\"eTag\":\"171eb65ae6639c4a7e2d3da9a6b90089\",\"versionId\":\"siEidW5P…\",\"sequencer\":\"00681A…\"}}}]}",
  "Timestamp" : "2025-05-06T16:22:29.254Z",
  "SignatureVersion" : "1",
  "Signature" : "...",
  "SigningCertURL" : "https://sns.eu-central-1.amazonaws.com/SimpleNotificationService-9c6….pem",
  "UnsubscribeURL" : "https://sns.eu-central-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-central-1:630658470130:osm-planet-eu-central-1-notifications:d56…"
}
9 Likes

Hi Grant,

thank you very much for this interesting opportunity to be informed about new diff files.

As someone who is not familiar with the AWS world: Can I only receive the Event Notifications with a (free) AWS login? To create an AWS login, I definitely need a credit card or bank account information (at least that’s as far as I’ve come in creating an account).

Best regards,
Pascal

1 Like

Yes, you will need your own AWS account to subscribe to the SNS notifications.

You can trigger non-AWS services via the HTTPS notification method.

The free tier is I believe only for the first year on new accounts. I am unsure if it is sufficient for the expected number of notifications

I have not yet calculated the volume of expected notifications and therefore the expected cost to those that decide to use this service.

1 Like

SNS always has 1M free notifications. That’s enough for under 2 per minute, and I would expect the planet to exceed that. I expect in most situations you’re better off polling with the existing state.txt methods. SNS is most useful where you’re feeding another AWS system, e.g. Lambda.

1 Like