Skip to content

11-07-2025 Release (Fix API CloudWatch alarms)#108

Merged
AnJuHyppolite merged 13 commits intomainfrom
dev
Nov 7, 2025
Merged

11-07-2025 Release (Fix API CloudWatch alarms)#108
AnJuHyppolite merged 13 commits intomainfrom
dev

Conversation

renovate bot and others added 13 commits August 29, 2025 17:40
<!-- Please complete the following sections as necessary. -->

### Description
<!-- Summary of the changes, related issue, relevant motivation, and
context -->

This PR updates the AWS CDK infrastructure to dynamically configure the
VPC and `serverlessV2MinCapacity` for the Aurora Serverless v2 clusters
based on the deployment environment (`dev` or `prod`). Previously,
values were hardcoded for dev, limiting environment-specific scaling.
This change ensures that the database scales appropriately and uses the
correct VPC for each environment.

### Ticket
<!-- Link to ticket in pivotal. Append ticket_id to provided URL. -->

This work resolves [Set VPC and serverlessV2MinCapacity Dynamically
Based on Deployment Environment
#592](newjersey/innovation-platform-pm#592).

### Approach
<!-- Any changed dependencies, e.g. requires an
install/update/migration, etc. -->

- Added logic to read environment context and apply environment-specific
values with a fallback to default to `dev` if the environment isn't
specified.
- Added environment-specific configuration for AWS accounts and regions,
VPC ids, and minimum/maximum capacities.
- Refactored stack initialization to accept dynamic environment
parameters instead of hardcoded values.

### Steps to Test
<!-- If this work affects a user's experience, provide steps to test
these changes in-app. -->

1. [Ensure AWS CLI is installed/up to
date](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
2.
[Configure](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html)
`~/.aws/credentials` and `~/.aws/config` with `dev` and `prod` profile
names.
3. Start an active AWS SSO session (run the `aws sso login` script).
   - **NOTE:** You need to be logged in before running synth or deploy.
4. Run synth _(see scripts)_ to verify CloudFormation templates.

### Notes

<!-- Additional information, key learnings, and future development
considerations. -->
- Synth output is used to verify the CloudFormation template and stack
configuration before deployment
- Deployment will occur after PR approval _(see [Deploy Feedback
database to Innov-Platform-Prod AWS
account](newjersey/innovation-platform-pm#477
<!-- Please complete the following sections as necessary. -->

### Description
Fixes the 4XXError and 5XXError alarms by specifying the ApiName
correctly in the alarm config.

### Steps to Test
1. Deploy the changes to `Innov-Platform-Dev`
2. Send invalid requests to the Feedback API (i.e. send a request to the
`/rating` endpoint with an empty request body).
3. Wait a few minutes, then open the CloudWatch alarm in the AWS console
and check that errors appear on the graph.

Note: I was only able to verify the 5XXError alarm since the Feedback
API currently only returns 500 or 400 responses. But since the alarms
are configured identically besides the metric, I believe this is
sufficient to ensure that the 4XXError alarm would work as well.
<!-- Please complete the following sections as necessary. -->

### Description

This PR updates the `README` to include a `Branching` section so that it
is clear what the process is for getting a slice of work into production
for the Feedback Widget API.

### Ticket

<!-- Link to ticket in pivotal. Append ticket_id to provided URL. -->
This work resolves [Document Feedback Widget API Branch
Merging/Deployment
Process](newjersey/innovation-platform-pm#717).

### Approach

<!-- Any changed dependencies, e.g. requires an
install/update/migration, etc. -->
Updated the `README` to include a `Branching` section right
above`Deployment`.

### Steps to Test

<!-- If this work affects a user's experience, provide steps to test
these changes in-app. -->
N/A

### Notes

<!-- Additional information, key learnings, and future development
considerations. -->
N/A
<!-- Please complete the following sections as necessary. -->

### Description

<!-- Summary of the changes, related issue, relevant motivation, and
context -->
This PR updates the **Branching** section in the `README` to clarify the
workflow steps.

### Ticket

<!-- Link to ticket in pivotal. Append ticket_id to provided URL. -->
This PR resolves [Follow-up: Document Feedback Widget API Branch
Merging/Deployment Process
](newjersey/innovation-platform-pm#757).

### Approach

<!-- Any changed dependencies, e.g. requires an
install/update/migration, etc. -->
Updated the Branching section in the `README` by removing redundancies
and clarifying the steps.

### Steps to Test

<!-- If this work affects a user's experience, provide steps to test
these changes in-app. -->
N/A

### Notes

<!-- Additional information, key learnings, and future development
considerations. -->
N/A
<!-- Please complete the following sections as necessary. -->

### Description

<!-- Summary of the changes, related issue, relevant motivation, and
context -->

This PR removes the AWS CDK Infrastructure as Code for the serverless
Aurora database, along with the logic for dynamically selecting the VPC
and scaling capacity based on the environment.

### Ticket

<!-- Link to ticket in pivotal. Append ticket_id to provided URL. -->
Resolves **FeedbackDbStack is deleted in the code** under [Clean up DB
migration AWS
resources](newjersey/innovation-platform-pm#733)

### Approach

<!-- Any changed dependencies, e.g. requires an
install/update/migration, etc. -->
- Deleted all code for serverless Aurora CDK database set up
- Deleted all code for dynamic VPC selection and scaling capacity
configuration

### Steps to Test

<!-- If this work affects a user's experience, provide steps to test
these changes in-app. -->
N/A

### Notes

<!-- Additional information, key learnings, and future development
considerations. -->
- The dev `FeedbackDBStack` in AWS has been deleted; its status is
`DELETE_COMPLETE`.
- The PRs that implemented the database work are documented in
**Feedback Widget Database Migration Technical Exploration** under
[Feedback Widget Database Pull
Requests](https://docs.google.com/document/d/1WQnP8SFqkFJtAv6B-5nkCq9cg6TPus7v28zdpZm9IPM/edit?tab=t.wsumd62gxwtf#heading=h.tfhcf3bp6jyw).
@AnJuHyppolite AnJuHyppolite merged commit 3c6c813 into main Nov 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants