Releases: floydspace/effect-aws
Releases · floydspace/effect-aws
@effect-aws/[email protected]
Patch Changes
- Updated dependencies [
192aad7
]:- @effect-aws/[email protected]
@effect-aws/[email protected]
Patch Changes
- Updated dependencies [
192aad7
]:- @effect-aws/[email protected]
@effect-aws/[email protected]
Patch Changes
- Updated dependencies [
192aad7
]:- @effect-aws/[email protected]
@effect-aws/[email protected]
Patch Changes
-
#165
192aad7
Thanks @floydspace! - expose service shape type as alternative of inferring it with Context.Tag.Service -
Updated dependencies [
192aad7
]:- @effect-aws/[email protected]
@effect-aws/[email protected]
Minor Changes
-
#167
8e4c246
Thanks @floydspace! - Implement streaming lambda handlerUsage
import { LambdaHandler, StreamHandler } from "@effect-aws/lambda"; import { NodeStream } from "@effect/platform-node"; import type { LambdaFunctionURLEvent } from "aws-lambda"; import { Cause, Stream } from "effect"; import { createGzip } from "node:zlib"; /** * Streaming handler that takes a Lambda Function URL event, compresses it using gzip and * returns the compressed data as a stream. */ const streamHandler: StreamHandler< LambdaFunctionURLEvent, never, Cause.UnknownException > = (event) => { return Stream.make(Buffer.from(JSON.stringify(event))).pipe( Stream.pipeThroughChannelOrFail( NodeStream.fromDuplex( () => createGzip(), (e) => new Cause.UnknownException(e), ), ), ); }; export const handler = LambdaHandler.stream(streamHandler);
Set the lambda function URL
InvokeMode
toRESPONSE_STREAM
:MyFunctionUrl: Type: AWS::Lambda::Url Properties: TargetFunctionArn: !Ref StreamingFunction AuthType: AWS_IAM InvokeMode: RESPONSE_STREAM
deploy the stack, and then invoke the function URL:
curl --request GET https://<url>.lambda-url.<Region>.on.aws/ --user $AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY --aws-sigv4 'aws:amz:<Region>:lambda' --output response.gz
@effect-aws/[email protected]
Patch Changes
- #165
192aad7
Thanks @floydspace! - expose service shape type as alternative of inferring it with Context.Tag.Service
@effect-aws/[email protected]
Patch Changes
- #165
192aad7
Thanks @floydspace! - expose service shape type as alternative of inferring it with Context.Tag.Service
@effect-aws/[email protected]
Patch Changes
- #165
192aad7
Thanks @floydspace! - expose service shape type as alternative of inferring it with Context.Tag.Service
@effect-aws/[email protected]
Patch Changes
- #165
192aad7
Thanks @floydspace! - expose service shape type as alternative of inferring it with Context.Tag.Service
@effect-aws/[email protected]
Patch Changes
- #165
192aad7
Thanks @floydspace! - expose service shape type as alternative of inferring it with Context.Tag.Service