aws / aws/aws-cdk-rfcs

Lambda-based dependency resolver\installer

Open
#926 0 comments 0 reactions 0 assignees View on GitHub
status/proposed
Dominant language
JavaScript
Stars
572
Forks
108
Avg merge
2m
Merged PRs (30d)
1

Description

## Lambda-based dependency resolver\installer

Use Lambda function (specifically - TriggerFunction) to spin up an environment and architecture requested by the user, installs dependencies provided by the user, saves output in a .zip in S3. Uses produced .zip file as Lambda layer, which can now be used for Lambda functions, which includes all requirements needed at runtime.

This continues to build on the [RFC to build locally](https://github.com/aws/aws-cdk/issues/18290), instead on building using Docker, and the [PR for the same](https://github.com/aws/aws-cdk/pull/37858).
Except, this time the build process in 100% on AWS infrastructure, and not local on the consumer development environment.
Similar to how _esbuild_ works in _aws_cdk.aws_lambda_nodejs.NodejsFunction_.

**Solution diagram:**

Image

**POC:**
https://github.com/CoreOxide/poc/tree/main/lambda_deps_builder

I propose adding it as a new build method in lambda-python-alpha (_aws_cdk.aws_lambda_python_alpha.PythonFunction_).

## Roles

| Role | User
|-------------------|------------------------------
| Proposed by | @CoreOxide
| Author(s) | @CoreOxide
| API Bar Raiser | @alias
| Stakeholders | @alias, @alias, @alias

> See [RFC Process](https://github.com/aws/aws-cdk-rfcs#rfc-process) for details

## Workflow

- [x] Tracking issue created (label: `status/proposed`)
- [ ] API bar raiser assigned (ping us at [#aws-cdk-rfcs](https://cdk-dev.slack.com/archives/C025ZFGMUCD) if needed)
- [ ] Kick off meeting
- [ ] RFC pull request submitted (label: `status/review`)
- [ ] Community reach out (via Slack and/or Twitter)
- [ ] API signed-off (label `status/api-approved` applied to pull request)
- [ ] Final comments period (label: `status/final-comments-period`)
- [ ] Approved and merged (label: `status/approved`)
- [ ] Execution plan submitted (label: `status/planning`)
- [ ] Plan approved and merged (label: `status/implementing`)
- [ ] Implementation complete (label: `status/done`)

---

> Author is responsible to progress the RFC according to this checklist, and
apply the relevant labels to this issue so that the RFC table in README gets
updated.

Contributor guide

Open the contributing guide

Research direction

Start with the linked POC in lambda_deps_builder and the aws_lambda_python_alpha.PythonFunction entry point. Read the related local-build RFC and PR to understand the proposed alternative. Done means the RFC has a defined API and workflow, passes the required review stages, and reaches an approved implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
build-system, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.