Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

510
Vistas
AccessDeniedException: User is not authorized to perform dynamodb BatchWriteItem on resource: table

I am using nodejs, serverless and aws dynamodb. I am trying to create a lambda where I am calling an API, getting the data (1000 records) and now, I want to insert this data into my dynamodb.

I am using batchWrite for this and using it by creating buckets of 25 json objects each. But I am getting an error:
AccessDeniedException: <Username> is not authorized to perform dynamodb BatchWriteItem on resource <table-name>

When I do the same without batchWrite and individual PUT operations, it works fine (but I need to use batch because that gives throughput exceeded error).

I have given all administrative rights in AWS to the user which I am using with serverless.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

in your serverless.yml file, you should add a new role

    - Effect: Allow
  Action:
    - dynamodb:DescribeTable
    - dynamodb:Query
    - dynamodb:Scan
    - dynamodb:GetItem
    - dynamodb:PutItem
    - dynamodb:UpdateItem
    - dynamodb:DeleteItem
    - dynamodb:BatchWriteItem
  Resource: "arn:aws:dynamodb:${self:custom.region}:*:table/*"
over 4 years ago · Santiago Trujillo Denunciar

0

Here is how I set it when using Amplify CLI project:

{
    "Effect": "Allow",
    "Action": [
        "dynamodb:PutItem",
        "dynamodb:DeleteItem",
        "dynamodb:GetItem",
        "dynamodb:Query",
        "dynamodb:Scan",
        "dynamodb:UpdateItem",
        "dynamodb:BatchWriteItem",
        "dynamodb:Scan"
    ],
    "Resource": "arn:aws:dynamodb:*:*:table/*"
},
{
    "Effect": "Allow",
    "Action": "dynamodb:Query",
    "Resource": "arn:aws:dynamodb:*:*:table/*/index/*"
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda