You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+93-11Lines changed: 93 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,9 @@ SDK, the Go version.
32
32
-[Kafka specific configuration](#kafka-specific-configuration)
33
33
-[Cache](#cache)
34
34
-[Redis](#redis-specific-configuration)
35
+
-[AWS configuration](#aws-configuration)
36
+
-[AWS Common configuration](#aws-common-configuration)
37
+
-[AWS Service configuration](#aws-service-configuration)
35
38
-[APM & Instrumentation](#apm---instrumentation)
36
39
-[Request ID middleware](#request-id-middleware)
37
40
- [HTTP server Request ID middleware](#http-server-request-id-middleware)
@@ -97,11 +100,12 @@ The list of predefined top-level configurations:
97
100
`config/logger.yml` configuration file.
98
101
*`Database`, containing the application database configuration, expects a
99
102
`config/database.yml` configuration file.
100
-
*`Redis`, containing the application Redis configuration, expects a
101
-
`config/redis.yml` configuration file. (TBD)
103
+
*`Cache`, containing the application Cache configuration, expects a
104
+
`config/cache.yml` configuration file.
102
105
*`PubSub`, containing the application pubsub configuration, expects a
103
106
`config/pubsub.yml` configuration file.
104
-
* <insertnewconfigurationhere>
107
+
*`AWS`, containing the application AWS configuration, expects a
108
+
`config/aws.yml` configuration file.
105
109
106
110
For example, to get the host and the port at which the HTTP server listens on
107
111
in an application:
@@ -983,6 +987,80 @@ To secure the requests to Redis, Go SDK provides a configuration set for TLS:
983
987
| Passphrase | Passphrase is used in case the private key needs to be decrypted | `passphrase` | `APP_CACHE_REDIS_TLS_PASSPHRASE` | string | pass phrase |
| Region | AWS region to use | `region` | `APP_AWS_REGION` | string | us-west-2 |
1031
+
| HTTP client max idle conns | Maximum number of idle connections in the HTTP client. | `max_idle_conns` | `APP_AWS_HTTP_CLIENT_MAX_IDLE_CONNS` | int | 100 |
1032
+
1033
+
#### AWS Service configuration
1034
+
1035
+
Currently, `go-sdk` supports the following AWS service types: `s3`, `sagemakerruntime`, `sfn` and `sqs`.
1036
+
1037
+
To facilitate the configuration of multiple services per service type, the configuration is split by the service name.
1038
+
To override the settings specified in the YAML via the environment variables, the following naming convention is used:
1039
+
1040
+
```
1041
+
APP_AWS_<SERVICE_TYPE>_<SERVICE_NAME>_*
1042
+
```
1043
+
1044
+
Where `SERVICE_TYPE` is the service type (s3, sqs etc.) and `SERVICE_NAME` is the service name (default, example etc.).
1045
+
1046
+
It is possible to specify region and HTTP client settings for each service, which will override the common configuration.
1047
+
1048
+
For each service, it is possible to specify credentials. Currently, `go-sdk` supports two types of credentials: `assume_role`and `static`.
1049
+
1050
+
`assume_role` credentials are used to assume a role to get credentials using AWS STS service. The following options are available:
1051
+
1052
+
| Setting | Description | YAML variable | Environment variable (ENV) | Type | Possible Values |
| ARN | The Amazon Resource Name (ARN) of the role to assume | `arn` | `APP_AWS_S3_DEFAULT_CREDENTIALS_ASSUME_ROLE_ARN` | string | arn:aws:iam::123456789012:role/role-name |
1055
+
1056
+
`static` credentials are used to specify the access key ID, secret access key and session token. The following options are available:
1057
+
1058
+
| Setting | Description | YAML variable | Environment variable (ENV) | Type | Possible Values |
0 commit comments