cds-snc / notification-planning-core

Project planning for GC Notify Core Team
0 stars 0 forks source link

Enable the Pinpoint default pool #370

Open sastels opened 2 weeks ago

sastels commented 2 weeks ago

Description

As a Notify team member, I need to be able to decide which SMS gets sent not using the short code.

WHY are we building?

Currently we can specify templates that are sent with the shortcode. However the other templates will also often get sent with the shortcode. We would like to have the other templates sent with the long codes.

WHAT are we building?

Create / turn on the Pinpoint default pool.

VALUE created by our solution

Fewer messages sent via short code. This will save money and allow us to reserve the short code for high priority messages.

Acceptance Criteria

Given some context, when (X) action occurs, then (Y) outcome is achieved.

QA Steps

Staging

Production

sastels commented 2 weeks ago

Add the default pool to k8s but set AWS_PINPOINT_DEFAULT_POOL_ID to "": https://github.com/cds-snc/notification-manifests/pull/2668

sastels commented 2 weeks ago

Will release tomorrow. After that, will turn on in staging.

sastels commented 2 weeks ago

PR to set phone number keywords correctly https://github.com/cds-snc/notification-terraform/pull/1358

PR to turn on the default pool in staging: https://github.com/cds-snc/notification-manifests/pull/2682

sastels commented 1 week ago

Default pool enabled in staging, looks pretty good!

sastels commented 1 week ago

PR for script to set phone number keywords correctly is ready for :eyes: : https://github.com/cds-snc/notification-terraform/pull/1358

jimleroyer commented 1 week ago

This was merged and moving in QA. Jimmy will review the keywords messages in staging env.

sastels commented 1 week ago

Long codes in production have been moved to the default pool and had their keywords set appropriately.

Trying to set the ARRET keyword to OPT_OUT for the shortcode pool gives the error

Error
Conflict Occurred - Reason="RESOURCE_MODIFICATION_NOT_ALLOWED" ResourceType="keyword" ResourceId="ARRET" RequestId: 7b4280c0-c1d5-4950-a40d-da679818a1a9 HttpStatusCode: 400
sastels commented 1 week ago

Having a bug bash on staging Tuesday.

jimleroyer commented 1 week ago

Jimmy reviewed the keywords and these look good!

sastels commented 1 week ago

Bug bash went well, no blockers found.

Tested sending with the default pool in production with

aws pinpoint-sms-voice-v2 send-text-message --destination-phone-number +16136192797 --message-body "test from pinpoint" --origination-identity pool-1240066b32d34ce896fc233a9c1c02fe

Verified that the SMS was sent from one of the long codes in the default pool.

sastels commented 1 week ago

Targeting release to production Wednesday June 19, 10:30.

sastels commented 6 days ago

Had a problem sending to non-US international numbers :disappointed: PR to fix https://github.com/cds-snc/notification-api/pull/2195

testing in staging.....

sastels commented 5 days ago

Also found that in the repo and staging SNS is not allowed to send internationally. It has been manually enabled in the prod database. We should fix this with a migration. At the same time we can probably turn on international sending for Pinpoint.

sastels commented 5 days ago

Discovered what the NO_ORIGINATION_IDENTITIES_FOUND error is that we were seeing in production

sastels commented 5 days ago

Enable international sending for SNS and Pinpoint in our provider database via a migration: https://github.com/cds-snc/notification-api/pull/2197

Tweak the pool creation script to enable shared routes for new Pinpoint pools: https://github.com/cds-snc/notification-terraform/pull/1396

After these two are merged (and the existing Pinpoint pools in staging and production have shared_routes enabled) we can turn on international Pinpoint sending again: https://github.com/cds-snc/notification-api/pull/2198

sastels commented 1 day ago

ok, everything's been reviewed and approved! Will merge into staging and test today.

sastels commented 1 day ago

merged into staging and tested (Pinpoint configured there for default pool)

Next steps:

  1. Release to prod (Tues).
  2. Verify that SNS and Pinpoint have supports_international set to True.
  3. Configure the default pool (ie turn it on) on prod and QA
sastels commented 9 hours ago

code released in prod, can enable the default pool in prod tomorrow.