fake_sqs | fake SQS server that you can run | Mock library
kandi X-RAY | fake_sqs Summary
kandi X-RAY | fake_sqs Summary
Provides a fake SQS server that you can run locally to test against
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fake_sqs
fake_sqs Key Features
fake_sqs Examples and Code Snippets
Community Discussions
Trending Discussions on fake_sqs
QUESTION
We're using Boto3 to connect to an SQS queue. In testing/production this is fine, but for local development I'm using a version of fake_sqs.
Rather than somehow fake real AWS endpoints (like overriding the hostname) I've opted to use a fake region (imaginatively called test
)
Other parts of our code use the earlier boto library (as opposed to Boto3). With this it's possible to override the region's endpoint host names by specifying an environment variable named BOTO_ENDPOINTS
. This contains a path to a file that contains Boto config for regions. For local testing, it contains just one
{
"sqs": {
"test": "fake_sqs"
}
}
Boto3, however, ignores such an envvar. It loads the data/endpoints.json
file stored in the botocore
package and, when connecting to our fake region, we get the error EndpointConnectionError: Could not connect to the endpoint URL: "https://test.queue.amazonaws.com/"
.
The codebase we've inherited has embedded the configuration of the queues pretty deep, so we can't simply tell the connection to use a specific endpoint (like this thread suggests).
So, does anyone know of a way to get Boto3 to use a different hostname without changing the code that we have to setup the SQS connection?
...ANSWER
Answered 2018-Mar-08 at 11:26You can drop in a custom endpoint file in ~/.aws/models
to replace the default one provided by botocore.
Additionally, you can use the AWS_DATA_PATH
environment variable if you have data overrides in another location.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fake_sqs
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page