Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.5k
SNS: v2 add http endpoint for opting out phone numbers#13540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Test Results - Preflight, Unit22 981 tests ±0 21 139 ✅ ±0 6m 29s ⏱️ +20s Results for commit a225dbad. ± Comparison against base commit14d1ccb. ♻️ This comment has been updated with latest results. |
github-actionsbot commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Test Results (amd64) - Acceptance7 tests ±0 5 ✅ ±0 3m 2s ⏱️ ±0s Results for commit a225dbad. ± Comparison against base commit14d1ccb. ♻️ This comment has been updated with latest results. |
github-actionsbot commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Test Results - Alternative Providers208 tests - 1 260 164 ✅ - 723 2m 11s ⏱️ - 30m 58s Results for commit a225dbad. ± Comparison against base commit14d1ccb. This pull requestremoves 1261 andadds 1 tests.Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
github-actionsbot commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Test Results (amd64) - Integration, Bootstrap 5 files ± 0 5 suites ±0 1h 29m 43s ⏱️ - 1h 6m 23s Results for commit a225dbad. ± Comparison against base commit14d1ccb. This pull requestremoves 2409 andadds 1 tests.Note that renamed tests count towards both.This pull requestremoves 388 skipped tests andadds 1 skipped test.Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
github-actionsbot commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 0m 19s ⏱️ - 54m 18s Results for commit a225dbad. ± Comparison against base commit14d1ccb. This pull requestremoves 2032 andadds 1 tests.Note that renamed tests count towards both.This pull requestremoves 224 skipped tests andadds 1 skipped test.Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
bentsku left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Awesome, nice addition! Just a minor comment regarding marking the test as not runnable in a different process, but then we're good to go 🚀
| TAGS:TaggingService=CrossRegionAttribute(default=TaggingService) | ||
| PHONE_NUMBERS_OPTED_OUT:list[PhoneNumber]=CrossRegionAttribute(default=list) | ||
| PHONE_NUMBERS_OPTED_OUT:set[PhoneNumber]=CrossRegionAttribute(default=set) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
quick followup question from the previous PR: should we put this back as lower case to follow the rest of the attributes?
| response=aws_client.sns.check_if_phone_number_is_opted_out(phoneNumber=phone_number) | ||
| assertnotresponse["isOptedOut"] | ||
| data= {"phoneNumber":phone_number,"accountId":account_id} | ||
| requests.post("http://localhost:4566/_aws/sns/phone-opt-outs",data=json.dumps(data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: might be worth switch this tophone_url = config.external_service_url() + SMS_PHONE_NUMBER_OPT_OUT_ENDPOINT like the other tests.
Also worth saying that the other endpoint tests are usinginternal_service_url, so those won't work in the k8s environment, so it might be worth marking this test as@markers.requires_in_process for now until we can validate they would work 👍
Uh oh!
There was an error while loading.Please reload this page.
Motivation
In AWS, you can opt-out phone numbers so they are not included in sms push notifications. This opt-out is usually done via keyword response (STOP and similar words) to the sms message, or can be done in AWS Console in a Service called Pinpoint.
This PR therefore implements a simple endpoint to allow users opting-out phone numbers for the sake testing and using SNS' opted-out operations.
closes PNX-549
Changes
/_aws/sns/phone-opt-outsas POST endpoint to SNSTests
Related