A VSCode extension that allows you to download and open S3 files directly from their S3 URIs.
video.mp4
Downloads and automatically opens an S3 file. Text files open in VSCode, other files open in the system default application.
Downloads an S3 file without opening it. Offers options to open the download folder or copy the file path.
Opens the extension settings page where you can configure download locations and behavior.
- Install the extension from the VSCode Marketplace: S3 Downloader
- Download the VSIX file from the latest release and open the Command Palette > "Extensions: Install from VSIX"
- Open the Command Palette (
Cmd+Shift+Pon Mac,Ctrl+Shift+Pon Windows/Linux) - Type "S3" to find available commands
- Select either:
- "S3: Open File" to download and open
- "S3: Download File" to download only
- "S3: Open Settings" to configure download location
- Enter your S3 URI (examples below)
- The file will be downloaded to your configured location
The extension provides structured logging in VSCode's Output panel:
- Open the Output panel (
View>OutputorCtrl+Shift+U) - Select "S3 Downloader" from the dropdown
Example output:
2024-11-14 12:00:00.000 [info] S3 Downloader extension activated!
2024-11-14 12:00:10.123 [info] Input URI: s3://my-bucket/file.txt
2024-11-14 12:00:10.456 [info] Parsed URI successfully
2024-11-14 12:00:10.789 [debug] Creating S3 client with region: us-west-2
2024-11-14 12:00:11.234 [info] Successfully received response from S3
2024-11-14 12:00:12.567 [info] File written successfully
The following S3 URI formats are supported through the amazon-s3-url package:
s3://my-bucket/path/to/file.txt(region auto-detected)s3://s3.amazonaws.com/my-bucket/path/to/file.txts3://my-bucket.s3.amazonaws.com/path/to/file.txthttps://s3.amazonaws.com/my-bucket/path/to/file.txthttps://my-bucket.s3.amazonaws.com/path/to/file.txts3://s3.us-west-2.amazonaws.com/my-bucket/path/to/file.txts3://my-bucket.s3.us-west-2.amazonaws.com/path/to/file.txthttps://s3.us-west-2.amazonaws.com/my-bucket/path/to/file.txthttps://my-bucket.s3.us-west-2.amazonaws.com/path/to/file.txt
The extension provides several settings to customize download behavior:
Choose where to save downloaded files:
downloads(default): System Downloads folderworkspace: Current workspace root folder (if available)temp: System temporary folder (createss3Downloadersubfolder)custom: Custom folder path specified in settings
When using custom download location, specify an absolute path here.
Examples:
/Users/username/Documents/s3Downloader(macOS/Linux)C:\Users\username\Documents\s3Downloader(Windows)
Always ask where to save files before downloading, regardless of other settings. Default: false
You can access settings in three ways:
- Command Palette:
S3: Open Settings - VSCode Settings: Search for "S3 Downloader"
- Settings JSON: Add to your
settings.json:{ "s3Downloader.downloadLocation": "workspace", "s3Downloader.customDownloadPath": "/Users/username/Documents/S3", "s3Downloader.alwaysPromptForLocation": false }
-
Downloads: Uses the OS-specific Downloads folder
- Windows:
%USERPROFILE%\Downloads - macOS:
~/Downloads - Linux:
~/Downloadsor$XDG_DOWNLOAD_DIR
- Windows:
-
Workspace: Uses the current VSCode workspace root folder
- Falls back to Downloads if no workspace is open
-
Temp: Uses the system temporary directory with an
s3Downloadersubfolder- Windows:
%TEMP%\s3Downloader - macOS/Linux:
/tmp/s3Downloaderor$TMPDIR/s3Downloader
- Windows:
-
Custom: Uses your specified absolute path
AWS credentials must be configured on your system (via AWS CLI, environment variables, or IAM roles) with permissions to read the S3 buckets you want to download from.
The extension uses the AWS SDK which automatically looks for credentials in this order:
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) - AWS credentials file (
~/.aws/credentials) - AWS config file (
~/.aws/config)
# Install dependencies
pnpm install
# Compile TypeScript
pnpm run compile
# Watch for changes
pnpm run watch- Open the project in VSCode
- Press
F5to run the extension in a new Extension Development Host window - In the new window, use
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) to open the command palette - Type "S3" and select either "S3: Open File" or "S3: Download File"
MIT