Aws / List All Streams
List All Streams
Lists all Kinesis streams in the AWS account.
aws kinesis list-streams aws kinesis list-streams #!/bin/bash
# List All Streams
aws kinesis list-streams import subprocess
# List All Streams
# Make sure to replace <placeholders> with actual values
def run_command():
cmd = [
"aws",
"kinesis",
"list-streams"
]
try:
print(f"Executing: {' '.join(cmd)}")
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Error: aws not found. Please install it first.")
if __name__ == "__main__":
run_command() When To Use
When preparing to collect data from all available streaming sources in an AWS environment.
Pro Tip
Use this command in conjunction with filters to narrow down visible streams, especially in large accounts.
Terminal Output
Expected runtime feedback
{
"Streams": [
{
"StreamName": "orders-stream",
"CreationTimestamp": "2023-10-01T12:00:00.000Z"
},
{
"StreamName": "payments-stream",
"CreationTimestamp": "2023-09-25T12:00:00.000Z"
}
]
} Anatomy of Output
Understanding the result
StreamName: {{name}}, Status: {{status}} Stream Information Displays the stream names alongside their status (ACTIVE, CREATING, DELETING, etc.).
CreationTime: {{timestamp}} Creation Time Indicates when the stream was initially created.
RetentionPeriodHours: {{hours}} Retention Period Shows how long the stream retains data.
Troubleshooting
Common pitfalls
ResourceNotFoundException: Kinesis stream not found
Solution: Ensure that the specified stream exists in your account.
LimitExceededException: Too many streams requested
Solution: Reduce the number of simultaneous requests to Kinesis.
InvalidParameterException: Invalid parameter value
Solution: Check input parameters conform to required formats.
Command Breakdown
What each part is doing
-
aws - Base Command
- The executable that performs this operation. Here it runs Aws before the shell applies any redirect operators.
How To Run
Execution path
- Step 1
Run the command: `aws kinesis list-streams`
- Step 2
Look for the 'Streams' key in the output to see all available streams.
Alternative Approaches
Comparable commands in other tools
Alternative kubernetes tools for the same job.
kaggle k list Qdbus / List Object Paths Specific Service qdbus <service_name> Service / List Services Status Linux service --status-all Sreport / Show Cluster Utilization Data Linux sreport -p cluster utilization Kaggle / List Kernel Output Files kaggle k files <kernel_name>