X Tutup
Skip to content

feat(api): optimize AppSync resolver deployment by skipping unchanged…#14599

Open
antonpogrebenko-public wants to merge 1 commit intoaws-amplify:devfrom
antonpogrebenko-public:exodigo/amplify
Open

feat(api): optimize AppSync resolver deployment by skipping unchanged…#14599
antonpogrebenko-public wants to merge 1 commit intoaws-amplify:devfrom
antonpogrebenko-public:exodigo/amplify

Conversation

@antonpogrebenko-public
Copy link

… 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.

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

@antonpogrebenko-public antonpogrebenko-public requested a review from a team as a code owner February 18, 2026 14:43
@antonpogrebenko-public
Copy link
Author

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

Unused variable compareCloudFormationStackFilesDetailed.
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

Unused variable compareVtlFilesDetailed.
return projectBucket;
}

function extractS3DeploymentRootKeyfromTemplateURL(templateURL) {

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused function extractS3DeploymentRootKeyfromTemplateURL.
return undefined;
}

function createS3TemplateUrl(deploymentKey, stackKey) {

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused function createS3TemplateUrl.
context,
) {
const cfTemplate = readJsonFile(cfFilePath);
const oldCfTemplate = readJsonFile(oldCfFilePath);

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused variable oldCfTemplate.
… 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.
@antonpogrebenko-public
Copy link
Author

Fixed github-advanced-security bot issues.

@jiayiwang7
Copy link
Member

jiayiwang7 commented Feb 24, 2026

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

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

X Tutup