Simple Ruby/Jets function which is running under VPC with all the privileges to access public internet, sometime fails to execute with “InitSeahorse::Client::NetworkingError” . The function do not have any code except to return simple string.
require "bundler/setup"
require "jets"
Jets.once # runs once in lambda execution context
def index(event:, context:)
return "Success"
end
This happens intermittently as sometime it runs correctly and sometime it fails with following errors stack
{
“errorMessage”: “execution expired”,
“errorType”: “InitSeahorse::Client::NetworkingError”,
“stackTrace”: [
“/var/lang/lib/ruby/2.5.0/net/http.rb:937:in initialize'", "/var/lang/lib/ruby/2.5.0/net/http.rb:937:in
open’”,
“/var/lang/lib/ruby/2.5.0/net/http.rb:937:in block in connect'", "/var/lang/lib/ruby/2.5.0/timeout.rb:103:in
timeout’”,
“/var/lang/lib/ruby/2.5.0/net/http.rb:935:in connect'", "/var/lang/lib/ruby/2.5.0/net/http.rb:920:in
do_start’”,
“/var/lang/lib/ruby/2.5.0/net/http.rb:915:in start'", "/var/lang/lib/ruby/2.5.0/delegate.rb:83:in
method_missing’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/net_http/connection_pool.rb:297:in start_session'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/net_http/connection_pool.rb:96:in
session_for’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/net_http/handler.rb:121:in session'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/net_http/handler.rb:73:in
transmit’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/net_http/handler.rb:47:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/plugins/content_length.rb:17:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/xml/error_handler.rb:8:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/signature_v4.rb:66:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/transfer_encoding.rb:26:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:173:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:204:in
retry_request’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:187:in retry_if_possible'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:175:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:204:in retry_request'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:187:in
retry_if_possible’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:175:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:204:in
retry_request’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:187:in retry_if_possible'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/retry_errors.rb:175:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/query/handler.rb:28:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/user_agent.rb:13:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/endpoint_pattern.rb:28:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/endpoint_discovery.rb:78:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/plugins/endpoint.rb:45:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/param_validator.rb:24:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/plugins/raise_response_errors.rb:14:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/param_converter.rb:24:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-core/plugins/response_paging.rb:10:in call'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/plugins/response_target.rb:23:in
call’”,
“/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/seahorse/client/request.rb:70:in send_request'", "/opt/ruby/gems/2.5.0/gems/aws-sdk-core-3.54.1/lib/aws-sdk-sts/client.rb:1329:in
get_caller_identity’”,
“/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/aws_info.rb:55:in account'", "/opt/ruby/gems/2.5.0/gems/memoist-0.16.0/lib/memoist.rb:170:in
account’”,
“/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/application.rb:197:in default_iam_policy'", "/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/application.rb:188:in
set_iam_policy’”,
“/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/application.rb:23:in configs!'", "/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/booter.rb:22:in
boot!’”,
“/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/core.rb:18:in boot'", "/opt/ruby/gems/2.5.0/gems/jets-1.9.9/lib/jets/core.rb:125:in
once’”,
“/var/task/handlers/jobs/indexer_job.rb:6:in <top (required)>'", "/var/lang/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in
require’”,
“/var/lang/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require’”
]
}