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.

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

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 Note

Unused variable compareVtlFilesDetailed.
return projectBucket;
}

function extractS3DeploymentRootKeyfromTemplateURL(templateURL) {

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused function extractS3DeploymentRootKeyfromTemplateURL.
return undefined;
}

function createS3TemplateUrl(deploymentKey, stackKey) {

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

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

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

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

1 participant

Comments