aws.sqs for ruby :undefined method `resolve_endpoint' for #<Aws::Endpoints::Endpoint:0xxxxxxxxx> #2934
Unanswered
walkerJia123
asked this question in
Q&A
Replies: 1 comment 8 replies
-
Thanks for opening an issue. Endpoint parameter and providers are useful for resolving dynamic endpoints. It looks like you have a static region and endpoint. Have you tried using the endpoint and region options like this? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
use endpoint_provider , get an error:
undefined method `resolve_endpoint' for #Aws::Endpoints::Endpoint:0xxxxxxxxx
this is my code , how can i fix it ?
` param= Aws::SQS::EndpointParameters.new(
endpoint: "http://xxx.xxx.xx",
region: "xxxxx",
use_dual_stack: false,
use_fips: false
)
my_endpoint = Aws::SQS::EndpointProvider.new.resolve_endpoint(param)
sqs_client = Aws::SQS::Client.new(region: "xxxxxx", credentials: my_credentials, endpoint_provider: my_endpoint)
def message_sent?(sqs_client, queue_url, message_body)
puts sqs_client
sqs_client.send_message(
queue_url: queue_url,
message_body: message_body,
message_group_id: "abc",
message_deduplication_id: "123456"
)
true
rescue StandardError => e
puts "Error sending message: #{e.message}"
false
end
when called method ‘message_sent’, got that error? error : Error sending message: undefined method
resolve_endpoint' for #Aws::Endpoints::Endpoint:0xxxxxxxxBeta Was this translation helpful? Give feedback.
All reactions