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:
| Output | Use |
|---|---|
databaseUrl (sensitive) | DATABASE_URL in .env. Keep it secret. |
defaultQueueUrl | RUNLANE_DEFAULT_QUEUE_URL in .env. |
longRunningQueueUrl | RUNLANE_LONG_RUNNING_QUEUE_URL in .env. |
deadLetterQueueUrl | The DLQ check below. |
region | AWS_REGION in .env and your shell. |
deliveryFunctionName, maintenanceFunctionName | Function log checks below. |
workerLogGroup | Worker log checks below. |
clusterName, serviceName | Find 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.
export AWS_REGION=us-east-1
export NODE_EXTRA_CA_CERTS="$PWD/certificates/rds-global-bundle.pem"
aws sts get-caller-identityUse 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
npm exec -- runlane trigger greeting.create '{"name":"Ada"}' --jsonRead run.id from the JSON response. Triggering stores the run; it does not wait for the result. Replace <run-id> below with that id:
npm exec -- runlane runs get <run-id> --jsonRepeat 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
npm exec -- runlane trigger report.build '{"seconds":5}' --jsonCopy this response's run.id. Read that run until run.status is succeeded:
npm exec -- runlane runs get <report-run-id> --jsonIts 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:
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:
export RUN_AT="$(node -p 'new Date(Date.now() + 2 * 60 * 1000).toISOString()')"npm exec -- runlane trigger greeting.create '{"name":"Later"}' --run-at "$RUN_AT" --jsonRead the new run.id and inspect it:
npm exec -- runlane runs get <scheduled-run-id> --jsonBefore 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:
export DEAD_LETTER_QUEUE_URL='<dead-letter-queue-url>'
aws sqs get-queue-attributes \
--queue-url "$DEAD_LETTER_QUEUE_URL" \
--attribute-names ApproximateNumberOfMessages ApproximateNumberOfMessagesNotVisible ApproximateNumberOfMessagesDelayedAll 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:
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 --followPress Ctrl+C, then check maintenance and the worker:
aws logs tail "/aws/lambda/$MAINTENANCE_FUNCTION_NAME" --since 10m --follow
aws logs tail "$WORKER_LOG_GROUP" --since 10m --followRun 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.
| Symptom | Likely cause | Fix |
|---|---|---|
| TLS certificate error | The 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 out | Network 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 AccessDenied | The 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 queued | The 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 DLQ | Delivery 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 missing | Migrations 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_missing | A 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 restarting | Startup 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 error | The 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 scheduled | Maintenance 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.