Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Bug: Cannot specify lambda version in LambdaSettings #200

@cheruvian

Description

@cheruvian

Bug Report

The documentation specifically demonstrates that the lambda runtime version can be overridden. In fact that any setting from the SDK can be merged but the TypeScript definition only has 3 properties (runtime is not included)

Documentation: https://litexa.com/book/deployment.html#lambda-configuration-optional
TypeScript definition: https://github.com/alexa-games/litexa/blob/v0.7.1/packages/litexa/src/command-line/templates/common/typescript/config/globals.d.ts#L21

Litexa Version

All

Current Behavior

Cannot provide any settings besides env vars, memory and duration.

Expected Behavior

Either update docs to not show undefined properties or update the types to support all supported properties.

Steps to Reproduce

Try using the config from the example in the docs (it fails to compile due to unknown property)

Additional Information

I recommend we simply update the TS definition to be a Partial of the actual AWS SDK Lambda type, this keeps litexa from needing to keep its own mapping/list of properties up to date with what is provided by lambda.


import AWS from 'aws-sdk'

type DeepPartial<T> = {
    [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};

type LambdaSettings = DeepPartial<AWS.Lambda.UpdateFunctionConfigurationRequest>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions