• 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
DeployingPackagingBuildingTestingDev ModeServicesFunctions
OverviewHTTP (API Gateway v2)REST (API Gateway v1)ActiveMQApplication Load BalancerAlexa SkillAlexa Smart HomeCloudWatch EventCloudWatch LogCloudFrontCognito User PoolEventBridge EventIoTIoT Fleet ProvisioningKafkaKinesis & DynamoDBMSKRabbitMQS3ScheduleSNSSQSWebsocket
LayersManaged InstancesWeb Apps (Lambda Web Functions)Sandboxes (Lambda MicroVMs)MCP ServersAlertsVersion 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 BucketStateAgent SkillsPython support
OverviewRuntimeGatewayMemoryBrowserCode InterpreterDev Mode
API Gateway Proxy
OverviewGeneral ConfigurationAuthenticationAPI KeysData SourcesResolversPipeline FunctionsSubstitutionsCachingDelta SyncCustom DomainWAFCLI Commands
Deploying SAM/CFN TemplatesWorkflow Tips
OverviewCreating PluginsCLI OutputCustom CommandsCustom VariablesExtending the Configuration schemaExtending and overriding configuration
OverviewDashboardAxiom
Overviewagent docsagent inspectagent setupagent skills installagent skills list / readdeploydeploy functiondeploy listdevdiffinfoinvokeinvoke localloginlogin awslogin aws ssologsmetricspackageplugin installplugin uninstallprintprunereconcileremoverollbackrollback functionusage
OverviewConcepts
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. CLI Reference
  2. Print

serverless print

serverless print resolves every variable in serverless.yml for a stage and prints the resulting configuration, so you can check what a ${...} reference resolves to before you deploy. It deploys nothing; variables that read AWS, such as ${ssm:...}, are resolved with the stage's credentials. To see the CloudFormation template the configuration produces, use serverless package; to compare it with the deployed stack, use serverless diff.

serverless print

Options

serverless print accepts these options:

OptionAliasValueDefaultRequiredDescription
--formatyaml, json or textyamlNoOutput format. text prints a string, number or list (one item per line); an object stops the command.
--pathdot-separated pathThe whole configurationNoPrint only the value at this path, such as provider.name.
--transformkeysNoPrint the keys of the selected object instead of the object.
--stage-sstringprovider.stage, else devNoStage to resolve the configuration for.
--region-rstringprovider.region, else us-east-1NoAWS Region to resolve the configuration for.
--aws-profilestringprovider.profileNoAWS profile whose credentials variables are resolved with.
--config-cfile pathserverless.ymlNoService configuration file to print.
--debugnamespaceNoAlso print a table of every resolved variable. See Show where each variable came from.

The command also accepts the options every command takes: --param="key=value" (repeatable), --org, --app, --verbose and --help (-h).

What serverless print shows

serverless print prints the configuration as written, with each variable replaced by its value and two changes: provider.stage holds the resolved stage, and params keeps only the default entry and the entry for that stage. It does not add the Framework's other defaults or the resources it generates.

For example, with this serverless.yml:

# serverless.yml
service: my-service

custom:
  bucketName: ${self:service}-${sls:stage}-uploads

provider:
  name: aws
  runtime: nodejs24.x

functions:
  hello:
    handler: handler.hello

resources:
  Resources:
    MyBucket:
      Type: AWS::S3::Bucket
      Properties:
        BucketName: ${self:custom.bucketName}

serverless print prints:

service: my-service
custom:
  bucketName: my-service-dev-uploads
provider:
  name: aws
  runtime: nodejs24.x
  stage: dev
functions:
  hello:
    handler: handler.hello
resources:
  Resources:
    MyBucket:
      Type: AWS::S3::Bucket
      Properties:
        BucketName: my-service-dev-uploads

The configuration goes to standard output and progress messages to standard error, so serverless print --format json > resolved.json writes a file you can read with other tools.

Print one value

serverless print --path selects one value by its dot-separated path. A path that does not exist, or whose value is empty, false or 0, stops the command with Path "<path>" not found. --transform keys turns the selected object into the list of its keys, and --format text prints a value or a list without YAML or JSON syntax. Any other --transform stops the command with Transform can only be "keys", and any other --format with Format must be "yaml", "json" or "text".

Show where each variable came from

With --debug, serverless print also prints a table with one row per resolved variable: its path in the configuration, the original ${...} text, the resolved value and the source that resolved it. The table goes to standard error, along with the debug log.

serverless print --debug

Side effects and CI use

  • serverless print deploys nothing, and the command itself changes nothing locally or in AWS. Variables that read other services, such as ${ssm:...} or ${cf:...}, make read calls with the stage's credentials. Code that runs while the configuration resolves, such as a JavaScript or TypeScript resolver referenced with ${file(...)} or a plugin, runs as written, including any files it writes or APIs it calls.
  • The command does not prompt, so it can run in CI, for example to check a stage's resolved configuration before a deploy.
  • The printed configuration contains every resolved value, including secrets read from SSM Parameter Store or Secrets Manager; don't publish it in build logs.

Provided lifecycle events

  • print:print

Examples

Print the configuration for a stage as JSON

serverless print --stage prod --format json

Print the provider name

serverless print --path provider.name --format text

Print all function names

serverless print --path functions --transform keys --format text

Related commands

  • serverless package builds the CloudFormation template from the resolved configuration.
  • serverless diff compares that template with the deployed stack.
Edit this page
Prev plugin uninstallNextprune

Contents

  • serverless print
  • Options
  • What serverless print shows
  • Print one value
  • Show where each variable came from
  • Side effects and CI use
  • Provided lifecycle events
  • Examples
  • Print the configuration for a stage as JSON
  • Print the provider name
  • Print all function names
  • Related commands

Related

GuidesPluginsExamplesSlack CommunitySupport