migrate AWS SDK v2 → v3#686
Open
zjawol wants to merge 1 commit intosid88in:masterfrom
Open
Conversation
…ues.ts - dead code, documentation update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Migrates all AWS SDK usage from the legacy
aws-sdkv2 package to the modular AWS SDK v3 (@aws-sdk/*packages). This is a prerequisite for dropping the v2 dependency and aligns the plugin with the current AWS SDK standard.Key changes:
AwsClientFactory— new class (src/aws-client-factory.ts) that lazily initializes and caches SDK v3 clients (AppSync, CloudFormation, CloudWatch Logs, Route53, ACM). ACM client is always pinned tous-east-1as required by CloudFront.src/index.ts— all AWS API calls migrated from v2 SDK classes/types to v3*Commandpattern.AwsClientFactoryis instantiated once in the constructor usingfromNodeProviderChain()for credentials.src/get-stack-value.ts— removed (dead code, functionality covered elsewhere).sls appsync evaluate— new CLI command that calls the AppSyncEvaluateCodeandEvaluateMappingTemplateAPIs to test JS resolvers and VTL templates against a context without deploying.sls appsync env get/set— new CLI commands to read and update AppSync runtime environment variables on a deployed API without redeploying.README.mdanddoc/commands.mdwith quick-reference tables; addeddoc/testing-resolvers.mdcovering theevaluateworkflow, fixture structure, pipeline chaining, and Jest integration examples. Node.js minimum requirement updated from v16 to v20.Issue(s)
Closes #685
Steps to test or reproduce
sls appsync evaluate --type Query --field getUser --function request \ --context '{"arguments":{"id":"abc-123"}}'sls appsync env get sls appsync env set --key STAGE --value production