aws-amplify / aws-amplify/amplify-cli

[minor request] simplify function templates and enable CORS for local dev

Open
#5,381 1 comment 0 reactions 1 assignee Claimed by @josefaidt View on GitHub
feature-request functions p3
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**

2 problems:

- users always run straight into CORS issues when they use our default templates. we could help them set CORS headers by default and leave a reminder to tighten it before shipping to prod
- the current DynamoDB CRUD template has a A LOT going on https://github.com/aws-amplify/amplify-cli/blob/7b1f0f2c7bb67a9d154e8462643fb0fe35e88399/packages/amplify-nodejs-function-template-provider/resources/lambda/crud/app.js.ejs and is hard to use. recommend swapping for something simpler like [this](https://github.com/aws-amplify/docs/pull/2429/files#diff-a67787665ab991c06d3739c4d7079e7b) and pointing to [our new guides](https://docs.amplify.aws/guides/api-rest/form-api-with-dynamodb-and-lambda/q/platform/js#creating-the-api).

**Describe the solution you'd like**
as above

**Describe alternatives you've considered**
do nothing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.