a2n-seattle / a2n-seattle/rms-app

Add GetItem as AWS function

Offen
#263 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @Turnonac Auf GitHub ansehen
task
Vorherrschende Sprache
TypeScript
Sterne
1
Forks
1
Ø Merge
27 Min.
Gemergte PRs (30 T.)
4

Beschreibung

Story Points: 1

# How?

1. in terminal, run `amplify add function`
2. Select which capability you want to add: Lambda function (serverless function)
3. Provide an AWS Lambda function name: GetItem
4. Choose the runtime that you want to use: NodeJS
5. Choose the function template that you want to use: Hello World

6. Do you want to configure advanced settings? Yes
7. Do you want to access other resources in this project from your Lambda function? Yes
8. Select the categories you want this function to have access to. storage
9. Storage has 14 resources in this project. Select the one you would like your Lambda to access batch, history, items, main, schedule, tags
10. Select the operations you want to permit on batch create, read, update, delete
11. Select the operations you want to permit on history create, read, update, delete
12. Select the operations you want to permit on items create, read, update, delete
13. Select the operations you want to permit on main create, read, update, delete
14. Select the operations you want to permit on schedule create, read, update, delete
15. Select the operations you want to permit on tags create, read, update, delete

Navigate to `amplify/backend/function/GetItem`
Delete `src/index.js`
In `GetItem-cloudformation-template.json`, change `resources.LambdaFunction.properties.handler` to `"./ts-output/handlers/api/GetItem.handler"`
In `backend-build.js`, add "GetItem" to API_NAMES
In `package.json`, change "main" to `"./ts-output/handlers/api/GetItem.handler"`
In `package.json`, add
```
"dependencies": {
"aws-sdk": "^2.1692.0"
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.