Skip to Content
Runlane
Run in productionDeploy to AWS

Check the deployment

Prove Lambda delivery, the container worker, and scheduled maintenance from your laptop.

Run these checks after your chosen tool finishes deploying. Use the app directory from Prepare the app. Keep the deployed worker and maintenance schedule running.

Lambda runs the greeting handler. Fargate, AWS's service for running containers, runs the report worker. Amazon Simple Queue Service (SQS) carries their wakeup messages. Amazon RDS hosts their shared Postgres database.

Load the deploy outputs

Your tool exposes these outputs:

OutputUse
databaseUrl (sensitive)DATABASE_URL in .env. Keep it secret.
defaultQueueUrlRUNLANE_DEFAULT_QUEUE_URL in .env.
longRunningQueueUrlRUNLANE_LONG_RUNNING_QUEUE_URL in .env.
deadLetterQueueUrlThe DLQ check below.
regionAWS_REGION in .env and your shell.
deliveryFunctionName, maintenanceFunctionNameFunction log checks below.
workerLogGroupWorker log checks below.
clusterName, serviceNameFind the worker in the ECS console. ECS manages the container service.

Save the database URL and both work queue URLs in .env as shown on your tool page. Use RUNLANE_ENVIRONMENT=tutorial everywhere. Keep the database URL's ?sslmode=verify-full suffix.

Export the region for AWS CLI commands too. Dotenv loads .env inside the app; it does not set values for the AWS CLI.

terminal
export AWS_REGION=us-east-1
export NODE_EXTRA_CA_CERTS="$PWD/certificates/rds-global-bundle.pem"
aws sts get-caller-identity

Use your deployed region. The identity command should show the account you deployed into. The CA bundle trusts the database's certificate authority, which signs its server certificate. Node reads NODE_EXTRA_CA_CERTS at process start. Export it before any Runlane command. See Node's CA option.

Your laptop needs database access and sqs:SendMessage on both work queues. It also needs log read access and sqs:GetQueueAttributes on the dead-letter queue. Use AWS credentials for the right account. Never copy a workload's keys onto your laptop.

Run a greeting on Lambda

terminal
npm exec -- runlane trigger greeting.create '{"name":"Ada"}' --json

Read run.id from the JSON response. Triggering stores the run; it does not wait for the result. Replace <run-id> below with that id:

terminal
npm exec -- runlane runs get <run-id> --json

Repeat the read until run.status is succeeded. Its run.output should be {"message":"Hello, Ada!"}. If it stays queued or fails, use the table below.

Run a report on Fargate

terminal
npm exec -- runlane trigger report.build '{"seconds":5}' --json

Copy this response's run.id. Read that run until run.status is succeeded:

terminal
npm exec -- runlane runs get <report-run-id> --json

Its run.output should be {"seconds":5}. This proves the worker consumed the long-running queue. Lambda consumes only default.

Read the run's saved logs:

terminal
npm exec -- runlane runs logs <report-run-id>

Expect the task's Building a 5-second report line. Runlane saved it from the task's console.log call. See task logs.

Prove maintenance runs

EventBridge Scheduler is an AWS timer service. Your deploy tool set it to invoke the maintenance Lambda every minute. A future run needs maintenance to publish its wakeup once due. A worker alone cannot publish it.

Choose a time two minutes ahead:

terminal
export RUN_AT="$(node -p 'new Date(Date.now() + 2 * 60 * 1000).toISOString()')"
terminal
npm exec -- runlane trigger greeting.create '{"name":"Later"}' --run-at "$RUN_AT" --json

Read the new run.id and inspect it:

terminal
npm exec -- runlane runs get <scheduled-run-id> --json

Before the due time, expect run.status to be scheduled. After that time and a maintenance pass, expect succeeded with {"message":"Hello, Later!"}. Allow for the next minute's pass and delivery time. Do not run runlane tick during this check; that would hide a broken AWS schedule.

Check the dead-letter queue

A dead-letter queue (DLQ) holds messages after repeated delivery failures. Both work queues send a message there after five receives without a successful delivery. These failures differ from a task that runs and stores a failed result. See SQS dead-letter queues.

Copy the DLQ URL from your deploy outputs:

terminal
export DEAD_LETTER_QUEUE_URL='<dead-letter-queue-url>'
aws sqs get-queue-attributes \
  --queue-url "$DEAD_LETTER_QUEUE_URL" \
  --attribute-names ApproximateNumberOfMessages ApproximateNumberOfMessagesNotVisible ApproximateNumberOfMessagesDelayed

All three counts should be 0. These SQS counts are approximate; recheck after traffic settles. Keep failed messages until you know their cause. Do not purge them to make this check pass.

Read the logs

CloudWatch Logs holds function and container logs. Set these names from your tool's outputs:

terminal
export DELIVERY_FUNCTION_NAME='<delivery-function-name>'
export MAINTENANCE_FUNCTION_NAME='<maintenance-function-name>'
export WORKER_LOG_GROUP='<worker-log-group>'
aws logs tail "/aws/lambda/$DELIVERY_FUNCTION_NAME" --since 10m --follow

Press Ctrl+C, then check maintenance and the worker:

terminal
aws logs tail "/aws/lambda/$MAINTENANCE_FUNCTION_NAME" --since 10m --follow
aws logs tail "$WORKER_LOG_GROUP" --since 10m --follow

Run one tail command at a time. See the AWS CLI log tail reference. The worker log shows Worker listening and the report's console line. Successful greetings print nothing; their stored status and output are the success check.

Troubleshoot

A security group holds network access rules. An IAM role is an AWS identity with permission policies. An event source mapping connects SQS to Lambda and polls messages for it.

SymptomLikely causeFix
TLS certificate errorThe CA file is missing, loaded too late, or the hostname is wrong.Check the bundle path. Export NODE_EXTRA_CA_CERTS before Node starts. Use the RDS hostname and sslmode=verify-full. Keep certificate checks on.
Connection to RDS times outNetwork rules block port 5432, or the database is not reachable.Check the RDS state, hostname, public access, routes, and security group. For private RDS, use an in-VPC path from the production checklist.
SQS AccessDeniedThe caller's role or queue policy blocks an action.Check the denied action, region, and queue URL. Producers and maintenance need sqs:SendMessage on both work queues. The worker also needs receive, delete, and visibility actions on its queue.
Run stays queuedThe consumer is stopped, bound to the wrong queue, or cannot claim the run.Check worker health and the event source mapping. Match the environment and URLs across processes. Inspect logs and pending delivery; keep maintenance running.
Messages reach the DLQDelivery keeps failing before Runlane can save a handled result.Inspect the message and logs. Fix the database, permissions, payload, or task catalog. Then redrive the messages.
Runlane tables are missingMigrations did not run against this database and schema.From the app root, load .env and export the absolute CA path as shown above. Rerun npm exec -- runlane adapter postgres migrate and read its output.
Run stays queued and logs show worker_task_missingA consumer has an old or different task catalog, so it skips the run.Deploy the shared app to every consumer and maintenance function. Keep task ids that still have saved work.
Fargate task keeps restartingStartup fails, required env values are missing, or image access fails.Read the ECS stopped-task reason and worker logs. Check env values, database access, the image pull role, and routes.
Fargate reports exec format errorThe image architecture differs from the task's x86_64 setting.Rebuild with docker build --platform linux/amd64. Push and deploy that image. Keep the task at LINUX / X86_64.
Future run stays scheduledMaintenance is not running or cannot publish to SQS.Check the Scheduler target, its invoke role, and maintenance logs. Check sqs:SendMessage on both queues.

For AWS details, see Lambda SQS setup, RDS connection failures, and ECS stopped-task errors.

Next, prepare for production. If the exercise is done, remove resources with your tool page's teardown command.

On this page