• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Serverless Framework Logo

Serverless Framework

Intro
SetupUpgrading To V4ConceptsTutorialAWS CredentialsLicense Keys
DeployingPackagingBuildingTestingServicesFunctions
OverviewHTTP (API Gateway v2)REST (API Gateway v1)ActiveMQApplication Load BalancerAlexa SkillAlexa Smart HomeCloudWatch EventCloudWatch LogCloudFrontCognito User PoolEventBridge EventIoTIoT Fleet ProvisioningKafkaKinesis & DynamoDBMSKRabbitMQS3ScheduleSNSSQSWebsocket
LayersManaged InstancesAlertsVersion PruningDomainsIAM Function PermissionsParameters
OverviewSelf-reference serverless.ymlServerless CoreEnvironment VariablesCLI OptionsExternal YAML/JSON FilesJavascript propertiesGitDoppler
OverviewS3 ObjectsSSM Parameter Store & Secrets ManagerCloudFormation Stack Outputs
OverviewVaultTerraform State Output
ResourcesComposing ServicesDeployment BucketStatePython support
OverviewRuntimeGatewayMemoryBrowserCode InterpreterDev Mode
API Gateway Proxy
OverviewGeneral ConfigurationAuthenticationAPI KeysData SourcesResolversPipeline FunctionsCachingDelta SyncCustom DomainWAFCLI Commands
Deploying SAM/CFN TemplatesWorkflow Tips
OverviewCreating PluginsCLI OutputCustom CommandsCustom VariablesExtending the Configuration schemaExtending and overriding configuration
OverviewDashboardAxiom
Overviewpackagedevdeploydeploy functiondeploy listinvokeinvoke locallogsloginlogin awslogin aws ssometricsinforollbackrollback functionremoveplugin installplugin uninstallprintprunesupportusagereconcile
Overview
OverviewMetricsTracesTroubleshoot
OverviewNode.jsPython
OutputsProviders
OverviewBranch DeploymentsPreview DeploymentsCustom ScriptsTestingPrivate PackagesNotificationsMono ReposDeploy in your own CI/CDBest PracticesTroubleshootingFAQ
OverviewSetupToolsAWS Integration
Serverless.yml Reference
Examples and TutorialsConfiguration Validation
  1. Usage
  2. App Sync
  3. CLI Commands

Commands

The AppSync integration provides some useful commands to explore and manage your API.

validate-schema

This commands allows you to validate your GraphQL schema.

sls appsync validate-schema

get-introspection

Allows you to extract the introspection of the schema as a JSON or SDL.

Options

  • --format or -f: the format in which to extract the schema. JSON or SDL. Defaults to JSON
  • --output or -o: a file where to output the schema. If not specified, prints to stdout
sls appsync get-introspection

flush-cache

If your API uses the server-side Caching, this command flushes the cache.

sls appsync flush-cache

console

Opens a new browser tab to the AWS console page of this API.

sls appsync console

cloudwatch

Opens a new browser tab to the CloudWatch logs page of this API.

sls appsync cloudwatch

logs

Outputs the logs of the AppSync API to stdout.

Options

  • --startTime: Starting time. You can use human-friendly relative times. e.g. 30m, 1h, etc. Default: 10m (10 minutes ago)
  • --tail or -t: Keep streaming new logs.
  • --interval or -i: Tail polling interval in milliseconds. Default: 1000.
  • --filter or -f: A filter pattern to apply to the logs stream.
sls appsync logs --filter '86771d0c-c0f3-4f54-b048-793a233e3ed9'

domain

Manage the domain for this AppSync API.

Create the domain

Before associating a domain to an API, you must first create it. You can do so using the following command.

Options

  • --quiet or -q: Don't return an error if the operation fails
  • --stage: The stage to use
sls appsync domain create

Delete the domain

Deletes a domain from AppSync.

Options

  • --quiet or -q: Don't return an error if the operation fails
  • --yes or -y: Automatic yes to prompts
  • --stage: The stage to use
sls appsync domain delete

If an API is associated to it, you will need to disassociate it first.

Create a route53 record

If you use Route53 for your hosted zone, you can also create the required CNAME record for your custom domain.

  • --quiet or -q: Don't return an error if the operation fails
  • --stage: The stage to use
sls appsync domain create-record

Delete the route53 record

  • --quiet or -q: Don't return an error if the operation fails
  • --yes or -y: Automatic yes to prompts
  • --stage: The stage to use
sls appsync domain delete-record

Associate the API to the domain

Associate the API in this stack to the domain.

  • --quiet or -q: Don't return an error if the operation fails
  • --stage: The stage to use
sls appsync domain assoc --stage dev

You can associate an API to a domain that already has another API attached to it. The old API will be replaced by the new one.

Disassociate the API from the domain

  • --quiet or -q: Don't return an error if the operation fails
  • --yes or -y: Automatic yes to prompts
  • --stage: The stage to use
sls appsync domain disassoc --stage dev
Edit this page
Prev WAFNextDeploying SAM/CFN Templates

Contents

  • Commands
  • validate-schema
  • get-introspection
  • flush-cache
  • console
  • cloudwatch
  • logs
  • domain
  • Create the domain
  • Delete the domain
  • Create a route53 record
  • Delete the route53 record
  • Associate the API to the domain
  • Disassociate the API from the domain

Related

GuidesPluginsExamplesSlack CommunitySupport