Outputs Reference

Every value exposed by sls.tf after a successful terraform apply

Lambda Outputs

function_arns

Type: map(string)

Map of Lambda function ARNs keyed by function name as defined in serverless.yml.

output "my_function_arn" {
  value = module.serverless.function_arns["hello"]
}

function_names

Type: map(string)

Map of deployed Lambda function names (e.g. my-api-dev-hello) keyed by function key.

function_invoke_arns

Type: map(string)

Map of Lambda invoke ARNs suitable for use as API Gateway integration URIs.

lambda_packages

Type: map(object)

Deployment package metadata for each function: output_path, output_size, output_size_mb, output_sha256, and within_aws_limit (true when package is under 50 MB).

role_arns

Type: map(string)

Map of IAM execution role ARNs keyed by function name.

role_names

Type: map(string)

Map of IAM execution role names keyed by function name.

policy_arns

Type: map(string)

Map of custom IAM policy ARNs keyed by function name (only populated when iamRoleStatements are defined).

API Gateway Outputs

api_gateway_invoke_url

Type: string | null

The base invoke URL for the deployed API Gateway stage, e.g. https://abc123.execute-api.us-east-1.amazonaws.com/dev. Null when no HTTP events are defined.

api_gateway_rest_api_id

Type: string | null

REST API ID. Useful for adding custom authorizers or domain mappings outside the module.

api_gateway_stage_name

Type: string | null

Deployed stage name (derived from provider.stage or stage_override).

api_gateway_resources

Type: map(string) | null

Map of API Gateway resource IDs keyed by path. Null when no HTTP events are defined.

S3 Event Outputs

s3_bucket_arns

Type: map(string)

Map of S3 bucket ARNs by bucket name — includes both newly-created and existing buckets.

s3_bucket_names

Type: map(list(string))

Map of S3 bucket names keyed by bucket key.

Schedule / EventBridge Outputs

schedule_rule_arns

Type: map(string)

Map of CloudWatch Event Rule ARNs for schedule events.

eventbridge_rule_arns

Type: map(string)

Map of EventBridge rule ARNs for eventBridge events.

Custom Resource Outputs

Outputs from the resources: section of serverless.yml (S3 buckets, DynamoDB tables, SNS topics, SQS queues, CloudFront distributions):

# DynamoDB
module.serverless.custom_dynamodb_table_names
module.serverless.custom_dynamodb_table_arns

# SQS
module.serverless.custom_sqs_queue_names
module.serverless.custom_sqs_queue_arns
module.serverless.custom_sqs_queue_urls

# SNS
module.serverless.custom_sns_topic_names
module.serverless.custom_sns_topic_arns

# S3
module.serverless.custom_s3_bucket_ids
module.serverless.custom_s3_bucket_arns

# CloudFront
module.serverless.custom_cloudfront_distribution_ids
module.serverless.custom_cloudfront_distribution_domain_names

Parsed Config Outputs

parsed_config

Type: any

The complete parsed and variable-resolved configuration object. Useful for debugging or feeding into other modules.

service_name

Type: string

The service name from your configuration file.

functions

Type: map(any)

Map of all function definitions with provider-level defaults applied.