Home

Awesome

awsls

A list command for AWS resources.

Release Software License Travis

awsls supports listing of over 250 types of resources across 100 different AWS services. The goal is to code-generate a list function for every AWS resource that is covered by the Terraform AWS Provider (currently over 500). If you want to contribute, the generator is here.

If you encounter any issue with awsls or have a feature request, please open an issue or write me on Twitter.

Happy listing!

Note: If you're also looking for an easy but powerful way to delete AWS resources, pipe the output of awsls into its new sibling awsrm via Unix-pipes and use well-known standard tooling such as grep for filtering.

Features

Examples

List various resource attributes

Use Terraform resource types to tell awsls which resources to list. For example, awsls aws_instance shows all EC2 instances. In addition to the default attributes TYPE, ID, REGION, and CREATED timestamp, additional attributes can be displayed via the --attributes <comma-separated list> flag. Every attribute in the Terraform documentation (here are the attributes for aws_instance) is a valid one:

List multiple resource types at once (via glob patterns)

For example, awsls "aws_iam_* lists all IAM resources:

List across multiple accounts and regions

To use specific profiles and/or regions, use the -p (--profiles) or -r (--regions) flags. For example, -p myaccount1,myaccount2 -r us-east-1,us-west-2 lists resources in every permutation of the given profiles and regions, i.e., resources in region us-west-2 and us-east-1 for account myaccount1 as well as myaccount2:

Usage

awsls [flags] <resource_type glob pattern>

To see options available run awsls --help.

Installation

Binary Releases

You can download a specific version of awsls on the releases page or install it the following way to ./bin/:

curl -sSfL https://raw.githubusercontent.com/jckuester/awsls/master/install.sh | sh -s v0.11.0

Homebrew

Homebrew users can install by:

brew install jckuester/tap/awsls

For more information on Homebrew taps please see the tap documentation.

Credentials, profiles and regions

If the --profiles and/or --regions flag is unset, awsls will follow the usual AWS CLI precedence of first trying to find credentials, profiles and/or regions via environment variables, and so on.

For example, if using --profiles foo,bar, but not setting the regions flag, awsls will first try to use the region from an environment variable (e.g., AWS_DEFAULT_REGION) and second will try to use the default region for each profile from ~/.aws/config.

The --all-profiles flag will use all profiles from ~/.aws/config, or if AWS_CONFIG_FILE=/my/config is set, from /my/config otherwise.

Supported resources

Currently, all 297 resource types across 100 services in the table below can be listed with awsls. The Tags column shows if a resource supports displaying tags, the Creation Time column if a resource has a creation timestamp, and the Owner column if resources are pre-filtered belonging to the account owner.

Note: the prefix aws_ for resource types is now optional. This means, for example, awsls aws_instance and awsls instance are both valid commands.

Service / TypeTagsCreation TimeOwner
accessanalyzer
aws_accessanalyzer_analyzerx
acm
aws_acm_certificatex
apigateway
aws_api_gateway_api_keyx
aws_api_gateway_client_certificatex
aws_api_gateway_domain_namex
aws_api_gateway_rest_apix
aws_api_gateway_usage_planx
aws_api_gateway_vpc_linkx
apigatewayv2
aws_apigatewayv2_apix
aws_apigatewayv2_domain_namex
aws_apigatewayv2_vpc_linkx
appmesh
aws_appmesh_meshx
appsync
aws_appsync_graphql_apix
athena
aws_athena_named_query
aws_athena_workgroupxx
autoscaling
aws_autoscaling_groupxx
aws_launch_configurationx
backup
aws_backup_planxx
aws_backup_vaultxx
batch
aws_batch_compute_environmentx
aws_batch_job_definitionx
cloudformation
aws_cloudformation_stackxx
aws_cloudformation_stack_setx
aws_cloudformation_type
cloudhsmv2
aws_cloudhsm_v2_clusterx
cloudtrail
aws_cloudtrailx
cloudwatch
aws_cloudwatch_dashboard
cloudwatchevents
aws_cloudwatch_event_archivex
aws_cloudwatch_event_busx
cloudwatchlogs
aws_cloudwatch_log_destinationx
aws_cloudwatch_log_groupxx
aws_cloudwatch_log_resource_policy
aws_cloudwatch_query_definition
codeartifact
aws_codeartifact_domainxx
aws_codeartifact_repositoryx
codebuild
aws_codebuild_projectx
aws_codebuild_report_groupx
aws_codebuild_source_credential
codecommit
aws_codecommit_repositoryx
codedeploy
aws_codedeploy_deployment_config
codepipeline
aws_codepipeline_webhookx
codestarconnections
aws_codestarconnections_connectionx
aws_codestarconnections_host
codestarnotifications
aws_codestarnotifications_notification_rulex
configservice
aws_config_config_rulex
aws_config_configuration_aggregatorxx
aws_config_configuration_recorder
aws_config_conformance_pack
aws_config_delivery_channel
costandusagereportservice
aws_cur_report_definition
databasemigrationservice
aws_dms_certificatex
aws_dms_endpointx
aws_dms_replication_subnet_groupx
aws_dms_replication_taskx
datasync
aws_datasync_agentx
aws_datasync_taskx
dax
aws_dax_parameter_group
aws_dax_subnet_group
devicefarm
aws_devicefarm_project
directconnect
aws_dx_connectionx
aws_dx_hosted_private_virtual_interface
aws_dx_hosted_public_virtual_interface
aws_dx_hosted_transit_virtual_interface
aws_dx_lagx
aws_dx_private_virtual_interfacex
aws_dx_public_virtual_interfacex
aws_dx_transit_virtual_interfacex
dlm
aws_dlm_lifecycle_policyx
dynamodb
aws_dynamodb_global_table
aws_dynamodb_tablex
ec2
aws_amixxx
aws_ebs_snapshotxxx
aws_ebs_volumexx
aws_ec2_capacity_reservationxxx
aws_ec2_carrier_gatewayxx
aws_ec2_client_vpn_endpointxx
aws_ec2_fleetxx
aws_ec2_local_gateway_route_table_vpc_associationxx
aws_ec2_managed_prefix_listxx
aws_ec2_traffic_mirror_filterx
aws_ec2_traffic_mirror_sessionxx
aws_ec2_traffic_mirror_targetxx
aws_ec2_transit_gatewayxxx
aws_ec2_transit_gateway_peering_attachmentxx
aws_ec2_transit_gateway_route_tablexx
aws_ec2_transit_gateway_vpc_attachmentxx
aws_egress_only_internet_gatewayx
aws_eipx
aws_instancexxx
aws_internet_gatewayxx
aws_key_pairx
aws_launch_templatexx
aws_nat_gatewayxx
aws_network_aclxx
aws_network_interfacexx
aws_placement_groupx
aws_route_tablexx
aws_security_groupxx
aws_spot_fleet_requestxx
aws_spot_instance_requestxx
aws_subnetxx
aws_vpcxx
aws_vpc_endpointxxx
aws_vpc_endpoint_connection_notification
aws_vpc_endpoint_servicex
aws_vpc_peering_connectionx
aws_vpn_gatewayx
ecr
aws_ecr_repositoryx
ecrpublic
aws_ecrpublic_repository
ecs
aws_ecs_clusterx
aws_ecs_task_definitionx
efs
aws_efs_access_pointxx
aws_efs_file_systemxxx
eks
aws_eks_clusterx
elasticache
aws_elasticache_global_replication_group
aws_elasticache_replication_groupx
elasticbeanstalk
aws_elastic_beanstalk_applicationx
aws_elastic_beanstalk_application_versionx
aws_elastic_beanstalk_environmentx
elastictranscoder
aws_elastictranscoder_pipeline
aws_elastictranscoder_preset
elb
aws_elbxx
elbv2
aws_alb_target_groupx
aws_lbxx
aws_lb_target_groupx
emr
aws_emr_security_configuration
firehose
aws_kinesis_firehose_delivery_streamx
fms
aws_fms_policy
fsx
aws_fsx_lustre_file_systemxxx
aws_fsx_windows_file_systemxxx
gamelift
aws_gamelift_aliasxx
aws_gamelift_buildxx
aws_gamelift_fleetx
aws_gamelift_game_session_queuex
globalaccelerator
aws_globalaccelerator_acceleratorxx
glue
aws_glue_crawlerxx
aws_glue_dev_endpointx
aws_glue_jobx
aws_glue_ml_transformx
aws_glue_registryxx
aws_glue_schemaxx
aws_glue_security_configuration
aws_glue_triggerx
aws_glue_workflowx
guardduty
aws_guardduty_detectorx
iam
aws_iam_access_keyx
aws_iam_account_alias
aws_iam_groupx
aws_iam_instance_profilexx
aws_iam_policyxx
aws_iam_rolexx
aws_iam_server_certificatex
aws_iam_service_linked_rolex
aws_iam_userxx
imagebuilder
aws_imagebuilder_componentx
aws_imagebuilder_distribution_configurationx
aws_imagebuilder_imagex
aws_imagebuilder_image_pipelinex
aws_imagebuilder_image_recipex
aws_imagebuilder_infrastructure_configurationx
iot
aws_iot_certificatex
aws_iot_policy
aws_iot_role_alias
aws_iot_thing
aws_iot_thing_type
aws_iot_topic_rulex
kafka
aws_msk_clusterxx
aws_msk_configurationx
kinesis
aws_kinesis_streamx
kinesisanalytics
aws_kinesis_analytics_applicationx
kinesisanalyticsv2
aws_kinesisanalyticsv2_applicationx
kms
aws_kms_external_keyx
aws_kms_keyx
lambda
aws_lambda_code_signing_config
aws_lambda_event_source_mapping
aws_lambda_functionx
lexmodelbuildingservice
aws_lex_bot
aws_lex_intent
aws_lex_slot_type
licensemanager
aws_licensemanager_license_configurationx
lightsail
aws_lightsail_domain
aws_lightsail_instancex
aws_lightsail_key_pair
aws_lightsail_static_ip
macie2
aws_macie2_classification_jobx
aws_macie2_custom_data_identifierx
aws_macie2_findings_filterx
mediaconvert
aws_media_convert_queuex
mediapackage
aws_media_package_channelx
mediastore
aws_media_store_containerxx
mq
aws_mq_brokerx
aws_mq_configurationx
mwaa
aws_mwaa_environmentx
neptune
aws_neptune_event_subscriptionx
networkfirewall
aws_networkfirewall_firewallx
aws_networkfirewall_firewall_policyx
aws_networkfirewall_rule_groupx
opsworks
aws_opsworks_stackx
aws_opsworks_user_profile
qldb
aws_qldb_ledgerx
rds
aws_db_event_subscriptionx
aws_db_instancexx
aws_db_parameter_groupx
aws_db_proxyx
aws_db_security_groupxx
aws_db_snapshotxx
aws_db_subnet_groupx
aws_rds_clusterx
aws_rds_cluster_endpointx
aws_rds_cluster_parameter_groupx
aws_rds_global_cluster
redshift
aws_redshift_clusterx
aws_redshift_event_subscriptionx
aws_redshift_parameter_groupx
aws_redshift_security_group
aws_redshift_snapshot_copy_grantx
aws_redshift_snapshot_schedulex
aws_redshift_subnet_groupx
route53
aws_route53_health_checkx
aws_route53_zonex
route53resolver
aws_route53_resolver_endpointxx
aws_route53_resolver_query_log_configxxx
aws_route53_resolver_query_log_config_associationx
aws_route53_resolver_rulexxx
aws_route53_resolver_rule_association
s3
aws_s3_bucketxx
s3outposts
aws_s3outposts_endpointx
sagemaker
aws_sagemaker_app_image_configx
aws_sagemaker_code_repositoryx
aws_sagemaker_endpointxx
aws_sagemaker_feature_groupxx
aws_sagemaker_modelxx
aws_sagemaker_model_package_groupxx
secretsmanager
aws_secretsmanager_secretx
securityhub
aws_securityhub_action_target
aws_securityhub_insight
servicecatalog
aws_servicecatalog_portfolioxx
aws_servicecatalog_service_action
aws_servicecatalog_tag_option
servicediscovery
aws_service_discovery_servicexx
ses
aws_ses_active_receipt_rule_set
aws_ses_configuration_set
aws_ses_domain_identity
aws_ses_email_identity
aws_ses_receipt_filter
aws_ses_receipt_rule_set
aws_ses_template
sfn
aws_sfn_activityxx
aws_sfn_state_machinexx
signer
aws_signer_signing_job
aws_signer_signing_profilex
sns
aws_sns_platform_application
aws_sns_topicx
aws_sns_topic_subscription
sqs
aws_sqs_queuex
ssm
aws_ssm_activationx
aws_ssm_association
aws_ssm_documentx
aws_ssm_maintenance_windowx
aws_ssm_parameterx
aws_ssm_patch_baselinex
aws_ssm_resource_data_sync
storagegateway
aws_storagegateway_gatewayx
aws_storagegateway_tape_poolx
synthetics
aws_synthetics_canaryx
timestreamwrite
aws_timestreamwrite_databasexx
transfer
aws_transfer_serverx
waf
aws_waf_byte_match_set
aws_waf_geo_match_set
aws_waf_ipset
aws_waf_rate_based_rulex
aws_waf_regex_match_set
aws_waf_regex_pattern_set
aws_waf_rulex
aws_waf_rule_groupx
aws_waf_size_constraint_set
aws_waf_sql_injection_match_set
aws_waf_web_aclx
aws_waf_xss_match_set
wafregional
aws_wafregional_byte_match_set
aws_wafregional_geo_match_set
aws_wafregional_ipset
aws_wafregional_rate_based_rulex
aws_wafregional_regex_match_set
aws_wafregional_regex_pattern_set
aws_wafregional_rulex
aws_wafregional_rule_groupx
aws_wafregional_size_constraint_set
aws_wafregional_sql_injection_match_set
aws_wafregional_web_aclx
aws_wafregional_xss_match_set
wafv2
aws_wafv2_web_acl_logging_configuration
worklink
aws_worklink_fleetx
workspaces
aws_workspaces_directoryx
aws_workspaces_ip_groupx
aws_workspaces_workspacex
xray
aws_xray_groupx