Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

A sample lambda is created when enabling cloud-api #184

Open
jarrettj opened this issue Aug 24, 2018 · 1 comment
Open

A sample lambda is created when enabling cloud-api #184

jarrettj opened this issue Aug 24, 2018 · 1 comment
Assignees
Labels

Comments

@jarrettj
Copy link

jarrettj commented Aug 24, 2018

Hi,

Good day.

Why is a sampleCloudApi function created? Can it be renamed? And if it is removed it still stays in the folder.

$ awsmobile cloud-api enable

Adding lambda function code on 
/Users/thejj/work/angular/projects/testing/awsmobilejs/backend/cloud-api/sampleLambda/
...

To test the api from the command line (after awsmobile push) use this commands
awsmobile cloud-api invoke sampleCloudApi <method> /items [init]

Regards.

@elorzafe
Copy link
Contributor

Hi,

When you enable cloud-api on your project like you did. awsmobile-cli creates a sample function so you can test your api against that function. Is an starting point to create your own functions on serverless express.

awsmobile-cli is not removing the folder in purpose so wont lose your code accidentally.

If you run awsmobile cloud-api enable -p (if you dont have that feature enabled) or awsmobile cloud-api configure (in case you have and select create new api) you can configure the function name that will create a directory with the same name.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants