Comments (6)
Sorry you're running into this. Can you provide a bit more information about how you are configuring your lambda and deploying that file?
I was not able to reproduce when I created a Lambda with Ruby 3.2 runtime (with both x86_64 and arm) in the console - it is able to load aws-sdk-secretsmanager
(and aws-eventstreams
).
from aws-sdk-ruby.
ah, that's interesting... hmm. This is the CDK for this function if that helps
from aws_cdk.aws_lambda import Code, Function, Runtime, LayerVersion
[...]
Function(
self,
"CorporateWebhooksAuthorizerFunction",
runtime=Runtime.RUBY_3_2,
handler="authorizer.Authorizer::lambda_handler",
code=Code.from_asset(
os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')),
bundling={
"image": Runtime.RUBY_3_2.bundling_image,
"command": [
'bash', '-c',
' && '.join([
'bundle config set path /asset-output/vendor/bundle',
'bundle install --without test development',
'cp -au functions/* /asset-output'
])
],
}
),
environment={
"AUTHORISER_API_KEY_SECRET_ID": api_key_secret.secret_name
},
layers=[
LayerVersion.from_layer_version_arn(
self,
"DatadogGemLayer",
f"arn:aws:lambda:{Stack.of(self).region}:464622532012:layer:Datadog-Ruby3-2:22"
),
LayerVersion.from_layer_version_arn(
self,
"DatadogExtensionLayer",
f"arn:aws:lambda:{Stack.of(self).region}:464622532012:layer:Datadog-Extension:56"
)
]
)
from aws-sdk-ruby.
Hmm - I did confirm the locations/versions of core and aws-eventstream on the Ruby 3.2 lambda env:
/var/runtime/ruby/3.2.0/gems/aws-sdk-core-3.191.2/lib/aws-sdk-core.rb
/var/runtime/ruby/3.2.0/gems/aws-eventstream-1.3.0/lib/aws-eventstream.rb
From the stack trace it does look like our code is loading aws-sdk-core from the same location, so I'm not certain why it wouldn't be able to find aws-eventstream. My best guess is that it could be related to the CDK code from asset or the lambda layers.
What is in the Gemfile you are using and does it include the SDK dependencies?
from aws-sdk-ruby.
it looks like this, I put the SDK dependencies into the development dependencies so they're available locally (for unit tests) but not installed in the bundle because it can rely on them in the environment for that. It could be something in the Datadog layers as they're 3rd parties...
source "https://rubygems.org"
group :development do
gem "aws-sdk-core"
gem "aws-sdk-secretsmanager"
gem "datadog-lambda"
gem "ddtrace"
end
group :test do
gem "bundler-audit"
gem "citizens-advice-style", github: "citizensadvice/citizens-advice-style-ruby", tag: "v11.0.0"
gem "climate_control"
gem "license_finder"
gem "rspec"
gem "rubocop", require: false
end
from aws-sdk-ruby.
Can you try adding the gem "aws-sdk-secretsmanager"
line to your Gemfile outside of the :development
group?
from aws-sdk-ruby.
that does seem to work (as I'd expect, but I was surprised it didn't work in just the runtime! the Datadog layers might be interfering interestingly and I can dig into that)
from aws-sdk-ruby.
Related Issues (20)
- Aws::Errors::MissingCredentialsError exception in ECS when using TaskRoleArn HOT 10
- Gem displays deprecation warning in ruby 3.3 HOT 7
- Report errors leading to failure to abort multipart upload HOT 3
- Unclear or incorrect parameters for call to get_queue_attributes HOT 2
- `AWS_EC2_METADATA_SERVICE_ENDPOINT` port is ignored HOT 4
- Fix Seahorse::Client::Plugin::PluginOption shape variation warnings HOT 6
- Rekognition `GetContentModeration` response differs from documentation HOT 7
- NameError: uninitialized constant Aws::Rest::ContentTypeHandler after upgrading aws-sdk-s3 from 1.146.1 to 1.147.0 HOT 7
- SimpleDB gem issues with aws-sdk-core >= 3.192.0 HOT 4
- EC2::Client#describe_security_groups undocumented & unchecked options limitation. HOT 10
- Seahorse http connection pool may crash after fork(2) HOT 7
- presigned_url always adds content-type to signed headers HOT 3
- Aws::EC2::Resources raises `InvalidParameterCombination` when some parameters are specified HOT 2
- aws-sdk-core >= 3.192.0 may be not compatible with AWS SQS APIs in XML format HOT 8
- In Ruby, S3 get_object_attributes() breaks in aws-sdk-core v3.192.0 and newer. HOT 5
- Content Type error in BedrockRuntime client on latest aws-sdk-core version HOT 5
- CloudFront KeyValueStore can't work HOT 3
- stub_responses function in Dynamodb, how can I pass query when stub? HOT 4
- aws-sdk-s3: intermittent SignatureDoesNotMatch errors HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-ruby.