Troubleshooting
This guide helps you debug common issues and understand Stelvio's internal workings when things go wrong.
Debugging with Verbose Output
When you encounter issues, use the verbose flags to get more detailed information:
These logs display information about the locations and values that Stelvio works with, as well as the operations it performs.
Understanding Log Files
Stelvio also writes logs to files to help diagnose issues. Log locations depend on your operating system:
- macOS:
~/Library/Logs/stelvio/ - Linux:
~/.local/state/stelvio/logs/ - Windows:
%LOCALAPPDATA%\stelvio\logs\
The .stelvio Directory
Each Stelvio project has a .stelvio/ directory in the project root:
.stelvio/userenv
- Contains your personal environment name
- Defaults to your computer username
- Can be customized (see Environments guide)
lambda_dependencies/
- Cached Lambda and Layer dependencies
- Safe to delete if you suspect corruption - regenerated on next deployment
{timestamp}-{random}/ (temporary working directory)
- Created when running commands that need state (
diff,deploy,refresh,destroy,outputs,statecommands) - Contains
.pulumi/stacks/{app}/{env}.json- state downloaded from S3 - Automatically deleted when command completes
- If a command crashes, leftover directories can be safely deleted
Renaming Your App or Environment
See State Management - Renaming for how to safely rename your app or environment.
Common Issues and Solutions
State Lock Errors
If you kill deploy/destroy operation while running or something crashes unexpectedly you might not be able to deploy.
Problem: You get "Stack is currently being updated"
Solution:
Only use this if you're certain no other deployment is actually running.
AWS Credential Issues
Problem: "Unable to locate credentials" or "Invalid security token"
Solution: Make sure your AWS credentials are setup properly.
You have three options:
-
Environment variable
AWS_PROFILEis set and profile exists: -
Environment variables
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYare set: - Set profile in
stlv_app.py:
How to check if AWS profile exists
- If you have AWS CLI installed, run:
-
Alternatively, you can check the AWS configuration files directly. Profiles are stored in
.aws/configand.aws/credentialsin your user directory.Platform-specific user directory paths
- Linux/macOS:
~/.aws/ - Windows:
%USERPROFILE%\.aws\
- Linux/macOS:
Permission Denied Errors
Problem: "Access Denied" when accessing AWS resources
Solutions:
- Verify IAM permissions for your AWS user/profile
- Check you're deploying to the correct region
- Ensure Parameter Store access is allowed for passphrases
Deployment Failures
Problem: Deployment fails with unclear errors
Solution:
Run with -vv for detailed logs
Cache Corruption
Problem: Strange build errors or outdated code being deployed
Solution:
Getting Help
If you're still stuck:
- Run your command with
-vvand check the full output - Check the log files for detailed error information
- Search GitHub issues
- Create a new issue with:
- Your Stelvio version (
stlv version) - The command you ran
- The error message
- Relevant logs (with sensitive data removed)
- Your Stelvio version (
- Get in touch with us at @stelviodev on X (Twitter) or @michal_stlv or @bascodes