Comments (5)
Looking at this now
from powertools-lambda-python.
@troyswanson I need a little more help here. Is this on VSCode? I pasted your code into a file but I can't generate an error message. Can you please give me more information about the setup?
from powertools-lambda-python.
Yes, I'm using VSCode. Here's a screenshot from my computer while hovering over the param_value
variable.
The return type for get_parameter
is str | dict[Unknown, Unknown] | bytes
because the function has the ability to transform the data from SSM into a dict or bytes. However, if you don't specify a transformation, it will just return as a str.
Using the int
function on a dict type will always fail, which is why the type checker is throwing the warning.
A fix that I can make in my code would be to use typing.cast
to force the type checker to assume the value is a str type, but I believe this can be solved in the Powertools library by overloading the type hints for the get_parameter
function depending on what kind of arguments are being passed to it.
from powertools-lambda-python.
Thank you for the update and for testing the issue locally! It sounds like you've pinpointed the challenge with the SSM provider. However I'm not seeing a simple way of implementing the override, mainly due to it being very specific to the SSM provider.
If you have a clear direction in mind for a solution, we'd greatly appreciate your contribution. Please feel free to open a pull request, and we can collaborate to refine the implementation and get it ready for merging. Looking forward to seeing your approach and working together on this!
from powertools-lambda-python.
⚠️ COMMENT VISIBILITY WARNING⚠️
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
from powertools-lambda-python.
Related Issues (20)
- Bug: custom serializer isn't being used by nested dict HOT 6
- Feature request: Default ALBResolver Response body to empty string instead of None HOT 2
- Maintenance: Fix codecov upload - missing token HOT 2
- Feature request: Support depth levels in feature flag keys HOT 3
- Feature request: ability to not throw error on full batch failure HOT 3
- [I Made This]: Bedrock agents with powertools HOT 2
- [Support Lambda Powertools]: BusPatrol HOT 3
- Bug: Register existing loggers function should use module logging, not source logger HOT 6
- Feature request: allow to provide an `appconfigdata` client in the `AppConfigStore` HOT 2
- Tech debt: Refactor parameters utility to use boto_config instead of config parameter
- Cookie class MaxAge produces invalid attribute, resulting to browser defaulting to session. HOT 4
- Bug: Recursive fails when using get_multiple in SSM parameters HOT 2
- Maintenance: downgrade AWS CDK to 2.145.0 HOT 1
- Bug: in_progress_expiration field is not set in Idempotency record when too close to lambda timeout HOT 8
- Bug: Defining security_schemes enforces the security on all endpoints HOT 4
- Bug: logger errors HOT 3
- Using `event_source` decorator with `tracer.capture_lambda_handler` decorator HOT 3
- Feature request: `validate()` to return validated payload HOT 5
- [I Made This]: Serverless multi-channel alerting solution based on user preferences HOT 2
- Docs: add mentions to Lambda layers in versioning policy HOT 2
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 powertools-lambda-python.