Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
baermat wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromsns/v2-opt-out-endpoint

Conversation

@baermat
Copy link
Member

@baermatbaermat commentedDec 17, 2025
edited
Loading

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.

  • The sms response is very involved to setup, especially since I don't have an US phone number and I am based in Austria.
  • Our current implementation of pinpoint doesn't support the operation we need.
    • Furthermore, it would require a completely new pinpoint <-> sns integration, for a service that is scheduled for deprecation.
      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

  • adds/_aws/sns/phone-opt-outs as POST endpoint to SNS
  • adds test
  • changes the type of opted out phone numbers to a set.

Tests

Related

@baermatbaermat added semver: minorNon-breaking changes which can be included in minor releases, but not in patch releases docs: skipPull request does not require documentation changes notes: skipPull request does not have to be mentioned in the release notes and removed docs: skipPull request does not require documentation changes labelsDec 17, 2025
@github-actions
Copy link

github-actionsbot commentedDec 17, 2025
edited
Loading

Test Results - Preflight, Unit

22 981 tests  ±0   21 139 ✅ ±0   6m 29s ⏱️ +20s
     1 suites ±0    1 842 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit a225dbad. ± Comparison against base commit14d1ccb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actionsbot commentedDec 17, 2025
edited
Loading

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 2s ⏱️ ±0s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit a225dbad. ± Comparison against base commit14d1ccb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actionsbot commentedDec 17, 2025
edited
Loading

Test Results - Alternative Providers

208 tests   - 1 260   164 ✅  - 723   2m 11s ⏱️ - 30m 58s
  1 suites  -     4    44 💤  - 537 
  1 files    -     4     0 ❌ ±  0 

Results for commit a225dbad. ± Comparison against base commit14d1ccb.

This pull requestremoves 1261 andadds 1 tests.Note that renamed tests count towards both.
tests.aws.services.cloudformation.api.test_changesets ‑ test_autoexpand_capability_requirementtests.aws.services.cloudformation.api.test_changesets ‑ test_create_and_then_remove_non_supported_resource_change_settests.aws.services.cloudformation.api.test_changesets ‑ test_create_and_then_remove_supported_resource_change_settests.aws.services.cloudformation.api.test_changesets ‑ test_create_and_then_update_refreshes_template_metadatatests.aws.services.cloudformation.api.test_changesets ‑ test_create_change_set_create_existingtests.aws.services.cloudformation.api.test_changesets ‑ test_create_change_set_invalid_paramstests.aws.services.cloudformation.api.test_changesets ‑ test_create_change_set_missing_stacknametests.aws.services.cloudformation.api.test_changesets ‑ test_create_change_set_no_changestests.aws.services.cloudformation.api.test_changesets ‑ test_create_change_set_update_nonexistingtests.aws.services.cloudformation.api.test_changesets ‑ test_create_change_set_update_without_parameters…
tests.aws.services.sns.test_sns.TestSNSSMS ‑ test_opt_out_phone_number_via_endpoint

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actionsbot commentedDec 17, 2025
edited
Loading

Test Results (amd64) - Integration, Bootstrap

    5 files  ±    0      5 suites  ±0   1h 29m 43s ⏱️ - 1h 6m 23s
3 146 tests  - 2 408  2 976 ✅  - 2 021  170 💤  - 387  0 ❌ ±0 
3 154 runs   - 2 406  2 978 ✅  - 2 019  176 💤  - 387  0 ❌ ±0 

Results for commit a225dbad. ± Comparison against base commit14d1ccb.

This pull requestremoves 2409 andadds 1 tests.Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodbtests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crudtests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_bookstests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setuptests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_snstests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infratests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_tabletests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]…
tests.aws.services.sns.test_sns.TestSNSSMS ‑ test_opt_out_phone_number_via_endpoint
This pull requestremoves 388 skipped tests andadds 1 skipped test.Note that renamed tests count towards both.
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input4-FAILED]tests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_deployed_infra_statetests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_populate_datatests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_user_clicks_are_storedtests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_api_exceptionstests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_create_exceptionstests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_create_invalid_desiredstatetests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_double_create_with_client_tokentests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_lifecycle…
tests.aws.services.sns.test_sns.TestSNSSMS ‑ test_opt_out_phone_number_via_endpoint

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actionsbot commentedDec 17, 2025
edited
Loading

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   1h 0m 19s ⏱️ - 54m 18s
3 121 tests  - 2 031  2 948 ✅  - 1 808  173 💤  - 223  0 ❌ ±0 
3 126 runs   - 2 028  2 951 ✅  - 1 805  175 💤  - 223  0 ❌ ±0 

Results for commit a225dbad. ± Comparison against base commit14d1ccb.

This pull requestremoves 2032 andadds 1 tests.Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodbtests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crudtests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_bookstests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setuptests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_snstests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infratests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_tabletests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]…
tests.aws.services.sns.test_sns.TestSNSSMS ‑ test_opt_out_phone_number_via_endpoint
This pull requestremoves 224 skipped tests andadds 1 skipped test.Note that renamed tests count towards both.
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input4-FAILED]tests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_deployed_infra_statetests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_populate_datatests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_user_clicks_are_storedtests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_api_exceptionstests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_create_exceptionstests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_create_invalid_desiredstatetests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_double_create_with_client_tokentests.aws.services.cloudcontrol.test_cloudcontrol_api.TestCloudControlResourceApi ‑ test_lifecycle…
tests.aws.services.sns.test_sns.TestSNSSMS ‑ test_opt_out_phone_number_via_endpoint

♻️ This comment has been updated with latest results.

@baermatbaermat added the docs: neededPull request requires documentation updates labelDec 18, 2025
@baermatbaermat marked this pull request as ready for reviewDecember 18, 2025 11:15
Copy link
Contributor

@bentskubentsku left a 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)
Copy link
Contributor

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))
Copy link
Contributor

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 👍

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bentskubentskubentsku left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

docs: neededPull request requires documentation updatesnotes: skipPull request does not have to be mentioned in the release notessemver: minorNon-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@baermat@bentsku

[8]ページ先頭

©2009-2025 Movatter.jp