Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not authorized to perform: dynamodb:PutItem on resource in EKS #558

Open
nanandmca opened this issue Apr 5, 2022 · 1 comment
Open

Not authorized to perform: dynamodb:PutItem on resource in EKS #558

nanandmca opened this issue Apr 5, 2022 · 1 comment

Comments

@nanandmca
Copy link

Expected Behavior

Actual Behavior

User: arn:aws:sts:::assumed-role//aws-sdk-java-1649071401744 is not authorized to perform: dynamodb:PutItem on resource: arn:aws:dynamodb:ap-southeast-1::table/

(Service: AmazonDynamoDBv2; Status Code: 400; Error Code: AccessDeniedException; Request ID: A400G97E6PDN6AOU3OEOH1O5AEMVJF66Q9ASUAAJG

Steps to Reproduce the Problem

  1. Deploy in EKS
  2. Use AWS role / arn

Specifications

  • Spring Data DynamoDB Version: 5.2.5
  • Spring Data Version: 2.5.10
  • AWS SDK Version: 1.11.914
  • Java Version: 14
  • Platform Details: EKS

All those information are logged by org.socialsignin.spring.data.dynamodb.repository.support.DynamoDBRepositoryFactory on INFO level on startup.
Or use java -version and mvn dependency:tree | grep -E 'spring|aws' to provide those version numbers.

@nanandmca
Copy link
Author

Same code is working fine when change to "com.github.derjust:spring-data-dynamodb" with older spring boot version...

  • even older spring boot version getting error for "io.github.boostchicken:spring-data-dynamodb"

I suspect may be table prefix have issue.. Can any one confirm how to handle table prefix in "io.github.boostchicken:spring-data-dynamodb"

public static class TableNameResolver extends DynamoDBMapperConfig.DefaultTableNameResolver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant