Nacelle

Go service framework
/

AWS environment variable configuration

Environment variables available to the Nacelle process change the behavior of AWS interactions.


These environment variables must be either prefixed with AWS or with the name of a service (e.g. AWS_REGION or S3_REGION). If any service-specific environment variable is set, then no non-prefixed environment variables are read.

Environment VariableDefaultDescription
CREDENTIALS_CHAIN_VERBOSE_ERRORSfalseEnables verbose error printing of all credential chain errors. Should be used when wanting to see all errors while attempting to retrieve credentials.
DISABLE_COMPUTE_CHECKSUMSfalseDisables the computation of request and response checksums, e.g., CRC32 checksums in Amazon DynamoDB.
DISABLE_ENDPOINT_HOST_PREFIXfalseDisableEndpointHostPrefix will disable the SDK’s behavior of prefixing request endpoint hosts with modeled information.
DISABLE_PARAM_VALIDATIONfalseDisables semantic parameter validation, which validates input for missing required fields and/or other semantic request input errors.
DISABLE_REST_PROTOCOL_URI_CLEANINGfalseDisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests. Will default to false. This would only be used for empty directory names in s3 requests.
DISABLE_SSLfalseSet this to true to disable SSL when sending requests.
EC2_METADATA_DISABLE_TIMEOUT_OVERRIDEfalseSet this to true to disable the EC2Metadata client from overriding the default http.Client’s Timeout. This is helpful if you do not want the EC2Metadata client to create a new http.Client. This options is only meaningful if you’re not already using a custom HTTP client with the SDK. Enabled by default.
ENABLE_ENDPOINT_DISCOVERYfalseEnableEndpointDiscovery will allow for endpoint discovery on operations that have the definition in its model. By default, endpoint discovery is off.
ENDPOINT""An optional endpoint URL (hostname only or fully qualified URI) that overrides the default generated endpoint for a client.
ENFORCE_SHOULD_RETRY_CHECKfalseEnforceShouldRetryCheck is used in the AfterRetryHandler to always call ShouldRetry regardless of whether or not if request.Retryable is set. This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck is not set, then ShouldRetry will only be called if request.Retryable is nil. Proper handling of the request.Retryable field is important when setting this field.
MAX_RETRIES-1The maximum number of times that a request will be retried for failures. Defaults to -1, which defers the max retry setting to the service specific configuration.
LOG_LEVEL“off”The level at which to log requests. See the note below.
REGIONThe region to send requests to. This parameter must be configured globally or on a per-client basis unless otherwise noted.
S3_DISABLE_100_CONTINUEfalseSet this to true to disable the SDK adding the Expect: 100-Continue header to PUT requests over 2MB of content. 100-Continue instructs the HTTP client not to send the body until the service responds with a continue status. This is useful to prevent sending the request body until after the request is authenticated, and validated.
S3_DISABLE_CONTENT_MD5_VALIDATIONfalseSet this to true to disable the S3 service client from automatically adding the ContentMD5 to S3 Object Put and Upload API calls. This option will also disable the SDK from performing object ContentMD5 validation on GetObject API calls.
S3_FORCE_PATH_STYLEfalseSet this to true to force the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual hosted bucket addressing when possible (http://BUCKET.s3.amazonaws.com/KEY).
S3_USEACCELERATEfalseSet this to true to enable S3 Accelerate feature. For all operations compatible with S3 Accelerate will use the accelerate endpoint for requests. Requests not compatible will fall back to normal S3 requests.
USE_DUAL_STACKfalseInstructs the endpoint to be generated for a service client to be the dual stack endpoint. The dual stack endpoint will support both IPv4 and IPv6 addressing.

For additional documentation on these options, see the Go AWS SDK.

Local development

Endpoints can be configured for easy local development with a local AWS service mock such as localstack.

1
2
export KINESIS_ENDPOINT=http://localstack:4568
export DYNAMODB_ENDPOINT=http://localstack:4569
AWS service log levels

The available log levels are off, debug, debug_with_signing, debug_with_http_body, debug_with_request_retries, debug_with_request_errors, and debug_with_event_stream_body.