Skip to content

Conversation

@mildaniel
Copy link
Contributor

@mildaniel mildaniel commented Feb 1, 2022

  • Check for build method and build options in the template function metadata. If the build method is esbuild, check for additional build properties and pass them to lambda builders.
  • Convert the properties dict to snake case to be consistent with sam-cli and lambda builders
  • If entry points aren't defined, default the entry point to the lambda handler.

Checklist

  • Add input/output type hints to new functions/methods
  • Write design document (Do I need to write a design document?)
  • Write unit tests
  • Write/update functional tests
  • Write/update integration tests
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added pr/internal area/build sam build command labels Feb 1, 2022
@mildaniel mildaniel changed the title Consume esbuild function metadata and pass to lambda builders feat: Consume esbuild function metadata and pass to lambda builders Feb 2, 2022
Copy link
Contributor

@hawflau hawflau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, approved with one minor question

return cdk_resource_id

@staticmethod
def normalize_build_properties(build_props) -> Dict:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question - is Lambda Builder expecting snake case for build properties in general and not only esbuild?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildProperties is a new field, but everything else we send lambda builders is snake case so I wanted to keep it consistent.

@mildaniel mildaniel merged commit b9504e2 into aws:develop Feb 4, 2022
@mildaniel mildaniel deleted the read-esbuild-function-metadata branch February 4, 2022 17:06
mndeveci pushed a commit to mndeveci/aws-sam-cli that referenced this pull request Apr 5, 2022
…ws#3613)

* Consume esbuild function metadata and pass to lambda builders

* Convert lambda builders options to snake case for consistency

* Determine entry point from handler

* Remove comment

* Remove commented code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build sam build command pr/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants