Skip to content

feat(gen2-migration): finance-tracker app#14636

Draft
sanjanaravikumar-az wants to merge 3 commits intogen2-migrationfrom
sanjrkmr/finance-tracker-app
Draft

feat(gen2-migration): finance-tracker app#14636
sanjanaravikumar-az wants to merge 3 commits intogen2-migrationfrom
sanjrkmr/finance-tracker-app

Conversation

@sanjanaravikumar-az
Copy link
Copy Markdown
Contributor

@sanjanaravikumar-az sanjanaravikumar-az commented Feb 27, 2026

Add Finance Tracker migration test app. A personal finance tracking app (React + Vite) using Auth (Cognito), GraphQL API, S3 Storage, Lambda Function, and CDK Custom Resources (SNS topics). The README documents the full Gen1 setup, Gen2 migration via gen2-migration generate, and the post-generate manual changes required for successful deployment.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sanjanaravikumar-az sanjanaravikumar-az requested a review from a team as a code owner February 27, 2026 22:04
@sanjanaravikumar-az sanjanaravikumar-az marked this pull request as draft February 27, 2026 22:04
@sanjanaravikumar-az sanjanaravikumar-az marked this pull request as ready for review March 4, 2026 14:58
Please tell us about your project
? What javascript framework are you using react
? Source Directory Path: src
? Distribution Directory Path: dist
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does changing this from the default do?


? Do you want to configure advanced settings? Yes
? Do you want to access other resources in this project from your Lambda function? Yes
? Select the categories you want this function to have access to. custom
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upto this step, custom does not exist in the app


**Edit in `./amplify/backend/function/financetracker7f7c2ad7/financetracker7f7c2ad7-cloudformation-template.json`:**

In the `Environment.Variables` section of the `LambdaFunction` resource, add:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to configure this through the cli

✔ Provide a name for your custom resource · customfinance
✔ Do you want to edit the CDK stack now? (Y/n) · no
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing npm run configure

The CLI only handles basic resource access permissions. The custom IAM policies and environment variables need to be added by manually editing the function's config files.

**Edit in `./amplify/backend/function/financetracker7f7c2ad7/custom-policies.json`:**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run configure will already copy paste custom policies.json. Why can't we hardcode these changes into the file to begin with?

https://github.com/aws-amplify/amplify-cli/pull/14636/changes#diff-65159b1eba01d0f81d60139815a1dd961f0f48d7f75a9d5392887f0747a89203R15

}
```

**Edit in `./amplify/backend/function/financetracker7f7c2ad7/function-parameters.json`:**
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also be configurable through the cli


#### 1. Lambda Function: Add `package.json`

Create `amplify/function/financetrackere30b1453/package.json` with AWS SDK v3 dependencies:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an issue about this in github? This ideally needs to be supported

export const financetrackere30b1453 = defineFunction({
...
- runtime: 22
+ bundling: {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide me the source for this property?

});
```

#### 4. Root `package.json`: Add AWS SDK Dependencies
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before - needs an issue about this (if it doesn't already exist)

In `amplify/data/resource.ts`, change the default authorization mode from API key to user pool:

```diff
authorizationModes: {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate on this change? The Gen1 app had apiKey as default. This would create drift right?

},
```

#### 6. Frontend `App.tsx`: Add `authMode: 'userPool'` to GraphQL Calls
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous question -> Why do we need userPool?

Copy link
Copy Markdown
Contributor

@dgandhi62 dgandhi62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarifying questions and changes

@dgandhi62
Copy link
Copy Markdown
Contributor

Note: App also needs a new resolver functionality

@sanjanaravikumar-az sanjanaravikumar-az marked this pull request as draft March 19, 2026 15:27
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