feat(api): optimize AppSync resolver deployment by skipping unchanged…#14599
feat(api): optimize AppSync resolver deployment by skipping unchanged…#14599antonpogrebenko-public wants to merge 1 commit intoaws-amplify:devfrom
Conversation
|
Maintainers - could you please approve workflows so CI can run? |
| const { fileLogger } = require('./utils/aws-logger'); | ||
| const { minifyAllJSONInFolderRecursively } = require('./utils/minify-json'); | ||
|
|
||
| const { compareCloudFormationStackFilesDetailed } = require('./utils/compare-json'); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
| const { minifyAllJSONInFolderRecursively } = require('./utils/minify-json'); | ||
|
|
||
| const { compareCloudFormationStackFilesDetailed } = require('./utils/compare-json'); | ||
| const { compareVtlFilesDetailed } = require('./utils/compare-vtl'); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
| return projectBucket; | ||
| } | ||
|
|
||
| function extractS3DeploymentRootKeyfromTemplateURL(templateURL) { |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
| return undefined; | ||
| } | ||
|
|
||
| function createS3TemplateUrl(deploymentKey, stackKey) { |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
| context, | ||
| ) { | ||
| const cfTemplate = readJsonFile(cfFilePath); | ||
| const oldCfTemplate = readJsonFile(oldCfFilePath); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
454fb83 to
694cfbc
Compare
… VTL templates - Add resolver optimization to reduce unnecessary S3 uploads during push - Compare VTL templates between current and new builds to detect changes - Reuse existing S3 deployment paths for unchanged resolver templates - Add --skip-unchanged-resolvers flag to amplify push command - Preserve deployment root keys for unchanged nested stack resources Performance improvement for AppSync APIs with many resolvers where only a subset have changed. This optimization can significantly reduce deployment time by avoiding re-uploading identical VTL mapping templates to S3. The optimization process: 1. Compares request/response mapping templates between builds 2. Identifies unchanged AppSync function configurations 3. Preserves existing S3 locations for unchanged templates 4. Only uploads modified resolver templates This change is backward compatible and opt-in via the --skip-unchanged-resolvers flag.
694cfbc to
29ed96e
Compare
|
Fixed github-advanced-security bot issues. |
|
Thanks for the PR and for working through the Gen1 AppSync performance issues. Unfortunately we're not accepting new features for Gen1 CLI anymore - the team's focus is on Gen2. We just released a migration tool beta: #14490 The resolver deployment optimization and CloudFormation stack limits remain top priorities for the Amplify backend team in Gen2. If you have specific requirement or proposal on this topic, please feel free to open an issue in Gen2 repo: https://github.com/aws-amplify/amplify-backend |
… VTL templates
Performance improvement for AppSync APIs with many resolvers where only a subset have changed. This optimization can significantly reduce deployment time by avoiding re-uploading identical VTL mapping templates to S3.
The optimization process:
This change is backward compatible and opt-in via the --skip-unchanged-resolvers flag.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.