Data Source: aws_service

Use this data source to compose and decompose AWS service DNS names.

Example Usage

Get Service DNS Name

data "aws_region" "current" {}

data "aws_service" "test" {
  region     = data.aws_region.current.name
  service_id = "ec2"
}

Use Service Reverse DNS Name to Get Components

data "aws_service" "s3" {
  reverse_dns_name = "cn.com.amazonaws.cn-north-1.s3"
}

Determine Regional Support for a Service

data "aws_service" "s3" {
  reverse_dns_name = "com.amazonaws.us-gov-west-1.waf"
}

Argument Reference

The following arguments are optional:

Attribute Reference

This data source exports the following attributes in addition to the arguments above: