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:
# Show INFO level logs
stlv deploy -v
# Show DEBUG level logs (most detailed)
stlv deploy -vv
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:
stlv unlock
stlv unlock staging
Only use this if you're certain no other deployment is actually running.
AWS Credential Issues
Problem: A stlv command stops with a short red message like this:
Unable to locate credentials
Profile: default (AWS_PROFILE not set), region: us-east-1
Check your AWS setup: 'aws configure', 'aws sso login', AWS_PROFILE, or AwsConfig(profile=...) in stlv_app.py.
The first line is the AWS error itself. The Profile: line tells you which profile
Stelvio used and where it came from: AwsConfig(profile=...) in stlv_app.py, the
AWS_PROFILE or AWS_DEFAULT_PROFILE environment variable, or the default profile when
neither is set. An expired SSO session, a missing profile, or a wrong access key shows up
the same way, with the AWS text on the first line.
To see the full Python traceback instead of the short message, run the command with
STLV_DEBUG=1.
Solution: Make sure your AWS credentials are set up properly.
You have three options:
-
Environment variable
AWS_PROFILEis set and profile exists:export AWS_PROFILE=YOUR_PROFILE_NAME -
Environment variables
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYare set:export AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>" export AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>" - Set profile in
stlv_app.py:stlv_app.py@app.config def configuration(env: str) -> StelvioAppConfig: return StelvioAppConfig( aws=AwsConfig(profile="your-profile"), )
How to check if AWS profile exists
- If you have AWS CLI
installed, run:
aws configure list-profiles -
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: "AccessDeniedException" when Stelvio reads its state, or "Access Denied" during a deploy
Solutions:
- Verify IAM permissions for your AWS user/profile
- Check you're deploying to the correct region
- Stelvio keeps its state in SSM Parameter Store (parameters under
/stlv/) and an S3 bucket namedstlv-state-*. Your profile needs read and write access to both.
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:
rm -rf .stelvio/lambda_dependencies
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