Packages
ex_aws
1.0.0-beta3
2.7.0
2.6.1
2.6.0
2.5.11
2.5.10
2.5.9
2.5.8
2.5.7
2.5.6
2.5.5
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.4
2.4.3
2.4.2
2.4.1
2.4.0
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.10
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.2
2.0.1
2.0.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
1.0.0-rc.4
1.0.0-rc.3
1.0.0-rc.1
1.0.0-beta3
1.0.0-beta2
1.0.0-beta1
1.0.0-beta0
0.5.0
0.4.19
0.4.18
0.4.17
0.4.15
0.4.14
0.4.13
0.4.11
0.4.10
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
0.0.5
0.0.4
0.0.3
AWS client for Elixir. Currently supports Dynamo, DynamoStreams, EC2, Firehose, Kinesis, KMS, Lambda, RRDS, Route53, S3, SES, SNS, SQS, STS and others.
Current section
Files
Jump to
Current section
Files
lib/ex_aws/config/defaults.ex
defmodule ExAws.Config.Defaults do
@moduledoc """
Defaults for each service
"""
@common %{
access_key_id: [{:system, "AWS_ACCESS_KEY_ID"}, :instance_role],
secret_access_key: [{:system, "AWS_SECRET_ACCESS_KEY"}, :instance_role],
http_client: ExAws.Request.Hackney,
json_codec: Poison,
}
@defaults %{
kinesis: %{
scheme: "https://",
host: {"$region", "kinesis.$region.amazonaws.com"},
region: "us-east-1",
port: 80
},
dynamodb: %{
scheme: "https://",
host: {"$region", "dynamodb.$region.amazonaws.com"},
region: "us-east-1",
port: 80
},
lambda: %{
host: {"$region", "lambda.$region.amazonaws.com"},
scheme: "https://",
region: "us-east-1",
port: 80
},
s3: %{
scheme: "https://",
host: %{
"us-east-1" => "s3.amazonaws.com",
"us-west-1" => "s3-us-west-1.amazonaws.com",
"us-west-2" => "s3-us-west-2.amazonaws.com",
"eu-west-1" => "s3-eu-west-1.amazonaws.com",
"eu-central-1" => "s3-eu-central-1.amazonaws.com",
"ap-southeast-1" => "s3-ap-southeast-1.amazonaws.com",
"ap-southeast-2" => "s3-ap-southeast-2.amazonaws.com",
"ap-northeast-1" => "s3-ap-northeast-1.amazonaws.com",
"sa-east-1" => "s3-sa-east-1.amazonaws.com",
},
region: "us-east-1"
},
sqs: %{
scheme: "https://",
host: {"$region", "sqs.$region.amazonaws.com"},
region: "us-east-1",
port: 80
},
sns: %{
host: {"$region", "sns.$region.amazonaws.com"},
scheme: "https://",
region: "us-east-1",
port: 80
},
ec2: %{
scheme: "https://",
host: {"$region", "ec2.$region.amazonaws.com"},
region: "us-east-1",
port: 80
},
rds: %{
scheme: "https://",
host: {"$region", "rds.$region.amazonaws.com"},
region: "us-east-1",
port: 80
},
}
@doc """
Retrieve the default configuration for a service.
"""
for {service, config} <- @defaults do
config = Map.merge(config, @common)
def get(unquote(service)), do: unquote(Macro.escape(config))
end
end