From 1f8b410b0152993654f224879d75b37f97d4a8c2 Mon Sep 17 00:00:00 2001
From: Andrew Johnston <asjohnston@alaska.edu>
Date: Tue, 12 Mar 2024 14:03:24 -0800
Subject: [PATCH 1/2] limit sns subscription to T1 and T2 scenes

---
 CHANGELOG.md               | 5 +++++
 landsat/cloudformation.yml | 1 +
 2 files changed, 6 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41ca5063..31bbdb3a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [0.0.2]
+
+### Changed
+- Limited the SNS subscription for Landsat to T1 and T2 scenes to filter out RT scenes earlier in the workflow.
+
 ## [0.0.1]
 
 ### Added
diff --git a/landsat/cloudformation.yml b/landsat/cloudformation.yml
index 4d2c4632..59a576e3 100644
--- a/landsat/cloudformation.yml
+++ b/landsat/cloudformation.yml
@@ -61,6 +61,7 @@ Resources:
       FilterPolicyScope: MessageBody
       FilterPolicy: |
         {
+          "landsat_product_id": [{"suffix": "_T1"}, {"suffix": "_T2"}],
           "s3_location": [{"prefix": "s3://usgs-landsat/collection02/level-1/standard/oli-tirs/"}]
         }
 

From 4d497f40dfa783946af38293444e40a8a671bc96 Mon Sep 17 00:00:00 2001
From: Andrew Johnston <asjohnston@alaska.edu>
Date: Tue, 12 Mar 2024 14:09:49 -0800
Subject: [PATCH 2/2] add integration test for RT scene

---
 tests/integration/landsat-l9-wrong-tier.json | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 tests/integration/landsat-l9-wrong-tier.json

diff --git a/tests/integration/landsat-l9-wrong-tier.json b/tests/integration/landsat-l9-wrong-tier.json
new file mode 100644
index 00000000..533e7b12
--- /dev/null
+++ b/tests/integration/landsat-l9-wrong-tier.json
@@ -0,0 +1,4 @@
+{
+  "landsat_product_id": "LC08_L1GT_001115_20240229_20240229_02_RT",
+  "s3_location": "s3://usgs-landsat/collection02/level-1/standard/oli-tirs/2024/001/115/LC08_L1GT_001115_20240229_20240229_02_RT/"
+}