You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Maintenance: Remove workaround for InvokeStore type issue in Batch utility #4796
So I looked into this and the issue is a clash between the aws-lambda types and the types in @aws/lambda-invoke-store. Basically you have to make sure that @aws/lambda-invoke-store is the first types loaded before aws-lambda.
In our case, that means adding import '@aws/lambda-invoke-store' at the top of the BasePartialBatchProcessor file as this is also the first time aws-lambda is loaded. Imo, the cure here is worse than the workaround because we are relying on undocumented import order to get the right types. I would rather we keep this workaround as it is explicit.
The real solution, I think, is for @aws/lambda-invoke-store to change their types as I proposed in this PR: awslabs/aws-lambda-invoke-store#18. This would allow for TS to gracefully merge the types with no work on the consumer side.
I'm pretty sure the only reason the other utilities don't have this problem is that they don't use aws-lambda in as many files as we do in Batch so the import '@aws/lambda-invoke-store' statements just happen to get loaded first.
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 reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Activity
dreamorosi commentedon Jan 6, 2026
Hey @svozza, do you think there's anything we can do about this now that things have settled?
svozza commentedon Jan 6, 2026
I haven't in investigated it properly yet. I will take a look tomorrow.
svozza commentedon Jan 7, 2026
So I looked into this and the issue is a clash between the
aws-lambdatypes and the types in@aws/lambda-invoke-store. Basically you have to make sure that@aws/lambda-invoke-storeis the first types loaded beforeaws-lambda.In our case, that means adding
import '@aws/lambda-invoke-store'at the top of theBasePartialBatchProcessorfile as this is also the first timeaws-lambdais loaded. Imo, the cure here is worse than the workaround because we are relying on undocumented import order to get the right types. I would rather we keep this workaround as it is explicit.The real solution, I think, is for
@aws/lambda-invoke-storeto change their types as I proposed in this PR: awslabs/aws-lambda-invoke-store#18. This would allow for TS to gracefully merge the types with no work on the consumer side.I'm pretty sure the only reason the other utilities don't have this problem is that they don't use
aws-lambdain as many files as we do in Batch so theimport '@aws/lambda-invoke-store'statements just happen to get loaded first.svozza commentedon Jan 7, 2026
I have re-opened my PR on
InvokeStore.dreamorosi commentedon Jan 7, 2026
Good call, let's work with the maintainers of that package to get it merged :)
svozza commentedon Jan 8, 2026
My PR got merged earlier today so we are good to remove this now.
powertools-for-aws-oss-automation commentedon Jan 9, 2026
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 reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon Jan 12, 2026
This is now released under v2.30.2 version!