Skip to content

Commit 5afca08

Browse files
committed
Revert "[TICKET-942] Update docs to remove Pinpoint references (#970)"
This reverts commit 4606a4a.
1 parent 4606a4a commit 5afca08

File tree

5 files changed

+23
-53
lines changed

5 files changed

+23
-53
lines changed

.github/workflows/template-only-ci-infra.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -101,30 +101,6 @@ jobs:
101101
aws-access-key-id: ${{ secrets.TESTER_AWS_ACCESS_KEY_ID }}
102102
aws-secret-access-key: ${{ secrets.TESTER_AWS_SECRET_ACCESS_KEY }}
103103

104-
# - name: Import orphaned test resources
105-
# working-directory: project-dir
106-
# run: |
107-
# # Import existing CloudWatch Log Groups and WAF resources to prevent conflicts
108-
# bin/terraform-init infra/networks dev || true
109-
# cd infra/networks
110-
111-
# # Import DNS query logging CloudWatch Log Group
112-
# terraform import 'module.domain.aws_cloudwatch_log_group.dns_query_logging[0]' \
113-
# /dns/hosted.zone.for.dev.network.com 2>/dev/null || echo "DNS log group not found or already in state"
114-
115-
# # Import WAF CloudWatch Log Group
116-
# terraform import 'module.network.aws_cloudwatch_log_group.waf_logs' \
117-
# aws-waf-logs-dev 2>/dev/null || echo "WAF log group not found or already in state"
118-
119-
# # Import WAF WebACL (requires getting ID and lock token)
120-
# WAF_ID=$(aws wafv2 list-web-acls --scope REGIONAL --region us-east-1 \
121-
# --query "WebACLs[?Name=='dev'].Id" --output text 2>/dev/null || echo "")
122-
# if [ -n "$WAF_ID" ]; then
123-
# terraform import 'module.network.aws_wafv2_web_acl.main' "$WAF_ID" 2>/dev/null || \
124-
# echo "WAF WebACL not found or already in state"
125-
# fi
126-
# continue-on-error: true
127-
128104
- name: Run Terratest
129105
working-directory: project-dir
130106
run: make -f template-only.mak test

docs/infra/notifications.md

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
The application may need to send email notifications to users. This document describes how to configure notifications. The notification setup process will:
44

5-
1. Configure Amazon SES (Simple Email Service) for sending emails
6-
2. Set up the necessary environment variables for the application service
5+
1. Create an AWS Pinpoint application for managing notifications
6+
2. Configure Amazon SES (Simple Email Service) for sending emails
7+
3. Set up the necessary environment variables for the application service
78

89
## Requirements
910

@@ -31,35 +32,28 @@ make infra-update-app-service APP_NAME=<APP_NAME> ENVIRONMENT=<ENVIRONMENT>
3132

3233
## 4. Send a test email
3334

34-
To send a test notification using the AWS CLI, first get the from email address for the environment you want to test.
35+
To send a test notification using the AWS CLI, first get the application id for the Pinpoint application/project for the environment you want to test.
3536

3637
```bash
3738
bin/terraform-init "infra/<APP_NAME>/service" "<ENVIRONMENT>"
38-
FROM_EMAIL="$(terraform -chdir=infra/<APP_NAME>/service output -raw ses_from_email)"
39+
APPLICATION_ID="$(terraform -chdir=infra/<APP_NAME>/service output -raw pinpoint_app_id)"
3940
```
4041

4142
Then run the following command, replacing `<RECIPIENT_EMAIL>` with the email address you want to send to:
4243

4344
```bash
44-
aws sesv2 send-email \
45-
--from-email-address "$FROM_EMAIL" \
46-
--destination "ToAddresses=<RECIPIENT_EMAIL>" \
47-
--content '{
48-
"Simple": {
49-
"Subject": {
50-
"Data": "Test notification",
51-
"Charset": "UTF-8"
52-
},
53-
"Body": {
54-
"Text": {
55-
"Data": "This is a message from the future",
56-
"Charset": "UTF-8"
57-
},
58-
"Html": {
59-
"Data": "This is a message from the future",
60-
"Charset": "UTF-8"
61-
}
45+
aws pinpoint send-messages --application-id "$APPLICATION_ID" --message-request '{
46+
"Addresses": {
47+
"<RECIPIENT_EMAIL>": { "ChannelType": "EMAIL" }
48+
},
49+
"MessageConfiguration": {
50+
"EmailMessage": {
51+
"SimpleEmail": {
52+
"Subject": { "Data": "Test notification", "Charset": "UTF-8" },
53+
"TextPart": { "Data": "This is a message from the future", "Charset": "UTF-8" },
54+
"HtmlPart": { "Data": "This is a message from the future", "Charset": "UTF-8" }
6255
}
63-
}
64-
}'
56+
}
57+
}
58+
}'
6559
```

docs/infra/service-command-execution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ To run other commands, modify the `--command` flag to execute the command, rathe
7373
If you get an error after running the above steps, these diagnosis steps may be helpful:
7474
1. Verify that `enableExecuteCommand` is `true` on your running task by using `aws ecs describe-tasks --cluster $APP_NAME-$ENVIRONMENT_NAME --task <TASK_ID>`. If not, run the `infra-update-app-service` command above and/or redeploy your service.
7575
2. Make sure that the SSM Agent is running by checking the `managedAgents` object in the `containers` array of the `aws ecs describe-tasks` command output. If it is `STOPPED`, you may have an issue with your container that is preventing the agent from running.
76-
3. Run the [amazon-ecs-exec-checker](https://github.com/aws-containers/amazon-ecs-exec-checker) script to further diagnose issues that may prevent ECS Exec from functioning.
76+
3. Run the [amazon-ecs-exec-checker](https://github.com/aws-containers/amazon-ecs-exec-checker) script to further pinpoint issues that may prevent ECS Exec from functioning.

docs/system-architecture.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ This diagram shows the system architecture. [🔒 Make a copy of this Lucid temp
1616
* **GitHub** — Source code repository. Also responsible for Continuous Integration (CI) and Continuous Delivery (CD) workflows. GitHub Actions builds and deploys releases to an Amazon ECR registry that stores Docker container images for the application service.
1717
* **Incident Management Service** — Incident management service (e.g. PagerDuty or Splunk On-Call) for managing on-call schedules and paging engineers for urgent production issues.
1818
* **NAT Gateway** — Enables outbound internet access for resources in private subnets.
19+
* **Pinpoint** — Amazon Pinpoint service used for sending email and SMS notifications to users.
1920
* **Secrets Manager** — Securely stores and retrieves sensitive information such as database credentials.
2021
* **Service** — Amazon ECS service running the application.
21-
* **SES** — Amazon SES (Simple Email Service) used for sending email notifications.
22+
* **SES** — Amazon SES used by Amazon Pinpoint for sending email notifications.
2223
* **Terraform Backend Bucket** — Amazon S3 bucket used to store terraform state files.
2324
* **Terraform State Locks DynamoDB Table** — Amazon DynamoDB table used to manage concurrent access to terraform state files.
2425
* **VPC Endpoints** — VPC endpoints are used by the Database Role Manager to access Amazon Services without traffic leaving the VPC.

infra/modules/domain/data/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ data "aws_acm_certificate" "certificate" {
88
}
99

1010
data "aws_route53_zone" "zone" {
11-
count = var.hosted_zone != null ? 1 : 0
12-
name = var.hosted_zone
13-
private_zone = false
11+
count = var.hosted_zone != null ? 1 : 0
12+
name = var.hosted_zone
1413
}

0 commit comments

Comments
 (0)