Skip to main content

Server

The server reports the host clients connect to, the endpoint's or the region's, with the protocol sqs, never a credential and never a protocol version.

A broker registered with with_broker_labeled is a server of the document, under its label. Its host is the host and port of the broker's endpoint; the scheme, any user info and the path stay out. A broker with no endpoint reports the regional host of its region, such as sqs.eu-west-1.amazonaws.com, or sqs.cn-north-1.amazonaws.com.cn in the China partition. The endpoint and the region are the ones named on the broker, or else the ones of the config given to from_config. A region the SDK resolves from the environment is known only once the service connects, after the document is built, so such a broker reports sqs.amazonaws.com. The protocol is sqs. protocolVersion stays out: SQS has one wire protocol, and a client matches no version of it. SNS publishes go through the same broker, so they share its server.

Credentials come from the SDK's chain or a prebuilt configuration once the service runs, and the document is built before that. No credential reaches it.

Example​

The broker reaches its region through the regional endpoint. Its server in the document is sqs.eu-west-1.amazonaws.com with the protocol sqs.

/// The service's region, through its regional endpoint.
fn broker() -> SqsBroker {
SqsBroker::new()
.endpoint("https://sqs.eu-west-1.amazonaws.com")
.region("eu-west-1")
}