a2n-seattle / a2n-seattle/rms-app

Add GetHistory as AWS function

Ouverte
#266 0 commentaires 0 réactions 1 personne assignée Réclamée par @Turnonac Voir sur GitHub
task
Langage dominant
TypeScript
Étoiles
1
Forks
1
Merge moyen
27 min
PR mergées (30 j)
4

Description

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: GetHistory
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/GetHistory`
Delete `src/index.js`
In `GetItem-cloudformation-template.json`, change `resources.LambdaFunction.properties.handler` to `"./ts-output/handlers/api/GetHistory.handler"`
In `backend-build.js`, add "GetHistory" to API_NAMES
In `package.json`, change "main" to `"./ts-output/handlers/api/GetHistory.handler"`
In `package.json`, add
```
"dependencies": {
"aws-sdk": "^2.1692.0"
}
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.