Part of the Pulse connectivity testing toolkit
Native S3 Connectivity Diagnostic Tool
This module validates S3 connectivity with explicit credential-source probing.
- Detects which credential source is actually used
- Probes multiple sources such as
web_identity,instance_profile,profile, andenv - Prints masked access key id and STS caller identity for each probe
- Classifies STS principal type (
ASSUMED_ROLE/IAM_USER/ etc.) to highlight IAM role sessions - In
authMode=auto, evaluates pure default-chain order (no credential config required) and marks which one is effective - Prints IAM-role/STS summary with detected sources, usable sources, and role-based usable sources
- Verifies path-level permissions for each credential source (one-by-one):
HeadBucketListObjectsV2onlsPath(if configured) or target prefixPutObjecton target prefix
- Continues probing all credentials even when one credential/provider check fails
# Build
mvn -pl s3-tools -am clean package
# Run from a working directory containing config.properties
java -jar native-s3-tools-jar-with-dependencies.jarCreate config.properties in the same directory as the JAR:
s3Path=s3://your-bucket/your/prefix
region=us-east-1
authMode=auto
# Optional: override ListObjectsV2 check target only
# lsPath=s3://your-bucket/another/prefixFor default-chain analysis, keep authMode=auto. In this mode, static/profile/web-identity override fields are ignored.
Exception: if roleArn is configured, the tool switches to explicit STS base-source probing and tries each source separately (system, env, profile, container, instance_profile) before STS AssumeRole.
| Value | Meaning |
|---|---|
auto |
Default chain: system, env, web identity, profile, container, instance profile (if roleArn is set, auto switches to explicit STS source-by-source probing: system/env/profile/container/instance_profile, each then AssumeRole) |
static |
Use accessKeyId + secretAccessKey (+ optional sessionToken) |
web_identity |
Use OIDC token file + role |
instance_profile |
Use EC2 instance metadata credentials |
profile |
Use ~/.aws/credentials profile |
env |
Use environment variables |
system_properties |
Use JVM system properties |
container |
Use ECS container credentials endpoint |
The tool prints:
- effective default-chain credential (
[DEFAULT_CHAIN_EFFECTIVE]) - each probe status (
detected=true/false,usable=true/false) - STS principal type for selected and each probe source
- caller identity (
arn,accountId) when available - AssumeRole target in probe detail when
roleArnis configured - IAM role / STS summary block (
[IAM Role / STS Summary]) - permission result per operation for every credential source (
allowed=true/false/SKIPPED)
Core models are in:
s3-tools/src/main/java/io/ck/pulse/s3/model/CredentialProbeResult.javas3-tools/src/main/java/io/ck/pulse/s3/model/PermissionCheckResult.javas3-tools/src/main/java/io/ck/pulse/s3/model/S3ConnectivityReport.java