📝

[小ネタ] AWS のサービスコード一覧を取得してみた

2025/03/02に公開
$ aws service-quotas list-services --region us-east-1 --query 'Services[*].ServiceCode'
サービスコード一覧
[
  "AWSCloudMap",
  "access-analyzer",
  "account",
  "acm",
  "acm-pca",
  "airflow",
  "amplify",
  "amplifyuibuilder",
  "aoss",
  "apigateway",
  "app-integrations",
  "appconfig",
  "appfabric",
  "appflow",
  "application-autoscaling",
  "application-cost-profiler",
  "application-signals",
  "appmesh",
  "apprunner",
  "appstream2",
  "appsync",
  "apptest",
  "aps",
  "athena",
  "auditmanager",
  "autoscaling",
  "autoscaling-plans",
  "aws-marketplace",
  "b2bi",
  "backup",
  "batch",
  "bcm-data-exports",
  "bcm-pricing-calculator",
  "bedrock",
  "billing",
  "billingconductor",
  "braket",
  "bugbust",
  "cases",
  "cassandra",
  "ce",
  "chatbot",
  "chime",
  "cleanrooms",
  "cleanrooms-ml",
  "cloud9",
  "cloudformation",
  "cloudfront",
  "cloudhsm",
  "cloudshell",
  "cloudtrail",
  "codeartifact",
  "codebuild",
  "codecommit",
  "codedeploy",
  "codeguru-profiler",
  "codeguru-reviewer",
  "codepipeline",
  "cognito-identity",
  "cognito-idp",
  "cognito-sync",
  "comprehend",
  "comprehendmedical",
  "compute-optimizer",
  "config",
  "connect",
  "connect-campaigns",
  "controltower",
  "crowdscale-usagelimitservice",
  "databrew",
  "dataexchange",
  "datapipeline",
  "datasync",
  "datazone",
  "dax",
  "deadline",
  "deepracer",
  "directconnect",
  "discovery",
  "dlm",
  "dms",
  "docdb",
  "docdb-elastic",
  "drs",
  "ds",
  "dynamodb",
  "ebs",
  "ec2",
  "ec2-ipam",
  "ec2fastlaunch",
  "ecr",
  "ecr-public",
  "ecs",
  "eks",
  "elastic-inference",
  "elasticache",
  "elasticbeanstalk",
  "elasticfilesystem",
  "elasticloadbalancing",
  "elasticmapreduce",
  "elastictranscoder",
  "emr-serverless",
  "entityresolution",
  "es",
  "events",
  "evidently",
  "fargate",
  "finspace",
  "firehose",
  "fis",
  "fms",
  "forecast",
  "frauddetector",
  "fsx",
  "gamelift",
  "geo",
  "glacier",
  "globalaccelerator",
  "glue",
  "grafana",
  "greengrass",
  "groundstation",
  "guardduty",
  "healthlake",
  "iam",
  "imagebuilder",
  "inspector",
  "inspector2",
  "internetmonitor",
  "iot",
  "iot1click",
  "iotanalytics",
  "iotcore",
  "iotdeviceadvisor",
  "iotevents",
  "iotfleethub",
  "iotfleetwise",
  "iotsitewise",
  "iotthingsgraph",
  "iottwinmaker",
  "iotwireless",
  "ivs",
  "ivschat",
  "kafka",
  "kafkaconnect",
  "kendra",
  "kendra-ranking",
  "kinesis",
  "kinesisanalytics",
  "kinesisvideo",
  "kms",
  "lakeformation",
  "lambda",
  "launchwizard",
  "lex",
  "license-manager",
  "license-manager-linux-subscriptions",
  "license-manager-user-subscriptions",
  "lightsail",
  "logs",
  "lookoutequipment",
  "lookoutmetrics",
  "lookoutvision",
  "m2",
  "machinelearning",
  "macie2",
  "managedblockchain",
  "managedblockchain-query",
  "mediaconnect",
  "mediaconvert",
  "medialive",
  "mediapackage",
  "mediapackagev2",
  "mediastore",
  "mediatailor",
  "medical-imaging",
  "memorydb",
  "mgh",
  "mgn",
  "migrationhuborchestrator",
  "migrationhubstrategy",
  "monitoring",
  "monitron",
  "mq",
  "neptune",
  "neptune-graph",
  "network-firewall",
  "networkinsights",
  "networkmanager",
  "networkmonitor",
  "notifications",
  "oam",
  "omics",
  "opensearch",
  "opsworks",
  "opsworks-cm",
  "organizations",
  "outposts",
  "panorama",
  "partnercentral",
  "payment-cryptography",
  "pca-connector-ad",
  "pca-connector-scep",
  "pcs",
  "personalize",
  "pinpoint",
  "polly",
  "private-networks",
  "profile",
  "proton",
  "qapps",
  "qbusiness",
  "qldb",
  "quicksight",
  "ram",
  "rbin",
  "rds",
  "redshift",
  "refactor-spaces",
  "rekognition",
  "resiliencehub",
  "resource-explorer-2",
  "resource-groups",
  "robomaker",
  "rolesanywhere",
  "route53",
  "route53profiles",
  "route53resolver",
  "rum",
  "s3",
  "s3-outposts",
  "sagemaker",
  "scheduler",
  "schemas",
  "scn",
  "sdb",
  "secretsmanager",
  "security-ir",
  "securityhub",
  "serverlessrepo",
  "servicecatalog",
  "servicequotas",
  "ses",
  "shield",
  "signer",
  "simspaceweaver",
  "sms",
  "snow-device-management",
  "snowball",
  "sns",
  "sqs",
  "ssm",
  "ssm-contacts",
  "ssm-guiconnect",
  "ssm-incidents",
  "ssm-sap",
  "sso",
  "states",
  "storagegateway",
  "support",
  "supportapp",
  "swf",
  "textract",
  "timestream",
  "timestream-influxdb",
  "tnb",
  "transcribe",
  "transfer",
  "translate",
  "trustedadvisor",
  "ts",
  "vendor-insights",
  "verifiedpermissions",
  "vmimportexport",
  "voiceid",
  "vpc",
  "vpc-lattice",
  "waf",
  "waf-regional",
  "wafv2",
  "wam",
  "wellarchitected",
  "wisdom",
  "workspaces",
  "workspaces-web",
  "xray"
]

概要

  • AWS CLI の list-services コマンドを実行
  • グローバルサービスを考慮してリージョンはバージニア北部を指定
  • --query オプションでサービス名のみ抽出

おまけ

特定のリージョンのすべてのサービスのクォータ情報を取得するスクリプトも作成してみました。

# 出力ファイルの指定
output_file="service_quotas_output.txt"

# 東京リージョンの指定
region="ap-northeast-1"

# サービス一覧を取得
services=($(aws service-quotas list-services --query 'Services[*].ServiceCode' --output text))

# 出力ファイルを初期化
echo "AWS Service Quotas Report for ${region}" > "$output_file"

# 東京リージョンのすべてのサービスに対してクォータ情報を取得
echo "[${region}]" | tee -a "$output_file"
for service in "${services[@]}"; do
    echo "  Service: ${service}" | tee -a "$output_file"
    aws service-quotas list-service-quotas --service-code "$service" --region "$region" --query 'Quotas[*].[QuotaName,Value]' --output table | tee -a "$output_file"
    echo "---------------------" | tee -a "$output_file"
done

以下は実行結果ですが非常に量が多いため出力については一部のみ掲載します。
コマンド実行にも数分程度かかるのでご注意ください。

実行結果
AWS Service Quotas Report for ap-northeast-1
[ap-northeast-1]
  Service: AWSCloudMap
--------------------------------------------------------------------
|                         ListServiceQuotas                        |
+--------------------------------------------------------+---------+
|  DiscoverInstances operation per account steady rate   |  1000.0 |
|  DiscoverInstancesRevision operation per account rate  |  3000.0 |
|  DiscoverInstances operation per account burst rate    |  2000.0 |
|  Namespaces per Region                                 |  50.0   |
+--------------------------------------------------------+---------+
---------------------
  Service: access-analyzer
----------------------------------------------------------------------
|                          ListServiceQuotas                         |
+--------------------------------------------------------+-----------+
|  Policy generations per day                            |  50.0     |
|  Concurrent policy generations                         |  1.0      |
|  Organization level analyzer                           |  5.0      |
|  Archive rules per analyzer                            |  100.0    |
|  Policy generation CloudTrail data size                |  25.0     |
|  Account level analyzer                                |  1.0      |
|  Policy generation CloudTrail time range               |  90.0     |
|  Access previews per analyzer per hour                 |  1000.0   |
|  CloudTrail log files processed per policy generation  |  100000.0 |
+--------------------------------------------------------+-----------+
以下略

まとめ

今回は AWS のサービスコード一覧を取得してみました。
どなたかの参考になれば幸いです。

参考資料

Discussion