Skip to content

Maintenance: Update InvokeStore to v0.2.1 #4787

@svozza

Description

@svozza

Summary

The InvokeStore package release a new version (v.0.2.1) last week that didn't export types correctly for a particular tsconfig.json setup. This affected Powertools so we didn't not upgrade. Yesterday a new version was released that fix the issue.

Why is this needed?

v0.2.x contains important changes to the API that we need to account for:

// old
import InvokeStore from '@aws/lambda-invoke-store';

// new
import InvokeStore from '@aws/lambda-invoke-store';

 //.. 
export const handler = () => {
  const invokeStore = InvokeStore.getInstanceAsync();
}

Which area does this relate to?

Other

Solution

We must upgrade to the new version and rather than using InvokeStore directly from the import, we must use globalThis.awslambda.InvokeStore.

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions