Skip to content

Commit

Permalink
fix: update binary type examples in README (#11)
Browse files Browse the repository at this point in the history
* Fix binary type examples in README

* binaryType -> llrtBinaryType
  • Loading branch information
FozzieHi authored Oct 15, 2024
1 parent a6aeb3b commit 3bc25c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ npm install cdk-lambda-llrt
Then you can use `LlrtFunction` construct. Just set an entry point for the function.

```ts
import { LlrtFunction, LlrtBundleType } from 'cdk-lambda-llrt';
import { LlrtFunction, LlrtBinaryType } from 'cdk-lambda-llrt';

const handler = new LlrtFunction(this, 'Handler', {
entry: 'lambda/index.ts',
bundleType: LlrtBundleType.FULL_SDK, // Optional: Choose between FULL_SDK, NO_SDK, or STANDARD (default)
llrtBinaryType: LlrtBinaryType.FULL_SDK, // Optional: Choose between FULL_SDK, NO_SDK, or STANDARD (default)
});
```

Expand All @@ -32,7 +32,7 @@ If you want to upgrade the LLRT version, remove the `.tmp` directory, which cont
In some cases, your code may run successfully on LLRT by setting bundle target platform to `browser`. You can configure it by the following code:

```ts
import { LlrtFunction, LlrtBundleType } from 'cdk-lambda-llrt';
import { LlrtFunction } from 'cdk-lambda-llrt';

const handler = new LlrtFunction(this, 'Handler', {
entry: 'lambda/index.ts',
Expand Down Expand Up @@ -69,7 +69,7 @@ You can specify the binary type when creating a new `LlrtFunction`:
```ts
const handler = new LlrtFunction(this, 'Handler', {
entry: 'lambda/index.ts',
binaryType: LlrtBinaryType.FULL_SDK,
llrtBinaryType: LlrtBinaryType.FULL_SDK,
});
```

Expand Down

0 comments on commit 3bc25c5

Please sign in to comment.