a2n-seattle / a2n-seattle/rms-app
Add GetHistory as AWS function
- Linguagem predominante
- TypeScript
- Estrelas
- 1
- Forks
- 1
- Merge médio
- 27min
- PRs com merge (30d)
- 4
Descrição
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"
}
```
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
A issue descreve a adição de uma nova função do AWS Lambda chamada GetHistory usando a Amplify CLI. Comece navegando até o diretório amplify/backend/function e seguindo as instruções passo a passo para criar a função e configurar o acesso dela aos recursos de armazenamento. O trabalho principal envolve atualizar arquivos de configuração como GetItem-cloudformation-template.json, backend-build.js e package.json. Verifique se a função funciona conferindo a configuração do AWS Amplify e garantindo que o caminho do handler aponte para o local correto de saída do TypeScript.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- aws, javascript, typescript
- Domínio
- api, backend, cloud
- Tipo de issue
- Funcionalidade
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 45/100