Skip to content

Repository files navigation

CMR Notifier

The CMR Notifier project provides public AWS SNS Topics that monitoring applications can subscribe to for new granule notification. Currently, this repository provides these topics:

  • New Sentinel-1 SLC and burst granules:

    arn:aws:sns:us-west-2:192755178564:ASF-sentinel1-cmr-notifier-prod
    

    which will broadcast messages like:

    {
      "granule_ur": "S1C_WV_SLC__1SSV_20250328T085056_20250328T085537_001639_002A31_AE2A-SLC",
      "metadata_url": "https://cmr.earthdata.nasa.gov/search/granules.umm_json?provider=ASF&granule_ur=S1C_WV_SLC__1SSV_20250328T085056_20250328T085537_001639_002A31_AE2A-SLC",
      "access_urls": ["https://datapool.asf.alaska.edu/SLC/SC/S1C_WV_SLC__1SSV_20250328T085056_20250328T085537_001639_002A31_AE2A.zip"]
    }
  • New NISAR L0B, L1, L2, and L3 granules:

    arn:aws:sns:us-west-2:192755178564:ASF-nisar-cmr-notifier-prod
    

    which will broadcast messages like:

    {
      "granule_ur": "NISAR_L1_PR_RSLC_004_076_A_022_2005_QPDH_A_20251103T110514_20251103T110549_X05007_N_F_J_001",
      "metadata_url": "https://cmr.earthdata.nasa.gov/search/granules.umm_json?provider=ASF&granule_ur=NISAR_L1_PR_RSLC_004_076_A_022_2005_QPDH_A_20251103T110514_20251103T110549_X05007_N_F_J_001",
      "access_urls": ["https://datapool.asf.alaska.edu/NISAR/NISAR_L1_RSLC_V1/NISAR_L1_PR_RSLC_004_076_A_022_2005_QPDH_A_20251103T110514_20251103T110549_X05007_N_F_J_001/NISAR_L1_PR_RSLC_004_076_A_022_2005_QPDH_A_20251103T110514_20251103T110549_X05007_N_F_J_001.h5"]
    }

Tip

If you're interested in notification for another ASF-managed dataset, let us know by opening an issue: https://github.com/ASFHyP3/CMR-notifier/issues/new

Usage

Important

The topics provided here only allow subscriptions using the AWS SQS and Lambda protocols.

Here is an example of a minimal CloudFormation template, which when deployed, will create a Sentinel-1 subscription for an AWS SQS Queue:

Parameters:
  QueueArn:
    Type: String

Resources:
  Sentinel1Subscription:
    Type: AWS::SNS::Subscription
    Properties:
      TopicArn: arn:aws:sns:us-west-2:192755178564:ASF-sentinel1-cmr-notifier-prod
      Protocol: sqs
      Endpoint: !Ref QueueArn

You can add a FilterPolicy to the subscription properties so that only the messages you are interested in are accepted: https://docs.aws.amazon.com/sns/latest/dg/sns-subscription-filter-policies.html

For example, this policy will only accept Sentinel-1 Burst product messages:

      FilterPolicyScope: MessageBody
      FilterPolicy:
        granule_ur:
          - suffix: '-BURST'

Or, this policy will only accept Sentinel-1C SLC product messages:

      FilterPolicyScope: MessageBody
      FilterPolicy:
        granule_ur:
          - prefix: 'S1C_'
          - suffix: '-SLC'

Or, when using the NISAR topic, this policy will only accept L-band Level-1 production RSLC product messages:

      FilterPolicyScope: MessageBody
      FilterPolicy:
        granule_ur:
          - prefix: 'NISAR_L1_PR_RSLC'

Or, when using the NISAR topic, this policy will only accept L-band urgent-response product messages:

      FilterPolicyScope: MessageBody
      FilterPolicy:
        granule_ur:
          - prefix: 'NISAR_L0_UR'
          - prefix: 'NISAR_L1_UR'
          - prefix: 'NISAR_L2_UR'
          - prefix: 'NISAR_L3_UR'

Development

This project uses pixi to manage software environments. To get started:

  1. Ensure that pixi is installed on your system: https://pixi.sh/latest/installation/.
  2. Clone this repository and navigate to the root directory of this project
    git clone https://github.com/ASFHyP3/CMR-notifier.git
    cd CMR-notifier
  3. Setup the development environment
     pixi run python -VV
  4. (Optional) Activate the environment. Either:
    1. use the pixi shell:
      pixi shell
    2. or, for traditional conda-like activation, run:
      eval "$(pixi shell-hook)"

Tip

If you've done (4), you don't need to prefix commands with pixi run.

  1. (Optional) Setup you IDE to work with pixi:

Tasks

We use pixi as a task runner (similar to a make). To see all available tasks, run:

pixi task list

When developing a new feature, you can ensure the code passes all static analyses and tests by running:

pixi run static
pixi run tests

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages