Com esse código, serverless.yaml
org: titiura
app: api-lambda
service: api-lambda
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs18.x
iam:
role:
statements:
- Effect: Allow
Action:
- s3:GetObject
Resource:
- arn:aws:s3:::alunos-csv/*
functions:
cadastrarAlunos:
handler: src/cadastro_batch/aws/index.cadastrarAlunos
events:
- s3:
bucket: alunos-csv
event: s3:ObjectCreated:*
rules:
- suffix: .csv
simulandoUploadDoCsv:
handler: src/cadastro_batch/local/index.simulandoUploadDoCsv
events:
- httpApi:
method: post
path: /alunos/batch
enabled: false
cadastrarAlunosDoBucketLocal:
handler: src/cadastro_batch/local/index.cadastrarAlunosDoBucketLocal
events:
- s3:
bucket: alunos-csv-local
event: s3:ObjectCreated:*
rules:
- suffix: .csv
enabled: false
plugins:
- serverless-offline
- serverless-s3-local
- serverless-disable-functions
eu tenho esse erro no terminal :
Error:
CREATE_FAILED: S3BucketAlunoscsv (AWS::S3::Bucket)
alunos-csv already exists
O que pode ser esse erro?