You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The service account is not used, the pod has hardcoded a call to the EKS node IAM role.
Adding the needed permissions to the node IAM role allows the deployment to run without issues, but I think it should be allowed/encouraged to use IRSA instead.
Providers:
region = "eu-west-1"
}
resource "random_pet" "pet" {
}
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
data "aws_eks_cluster" "eks" {
name = module.eks.name
}
provider "kubernetes" {
config_path = "./my-kubeconfig-file"
}
Tapir pod logs: 2023-09-04 09:59:56,270 INFO [io.quarkus] (main) Installed features: [amazon-dynamodb, amazon-s3, cdi, config-yaml, elasticsearch-rest-client, hibernate-validator, quinoa, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, smallrye-openapi, vertx] 2023-09-04 09:59:56,275 INFO [cor.Bootstrap] (main) Validate GPG key configuration provided 2023-09-04 09:59:56,277 INFO [cor.Bootstrap] (main) Start to bootstrap registry database [dynamodb] 2023-09-04 09:59:56,884 WARN [sof.ama.aws.aut.cre.int.WebIdentityCredentialsUtils] (main) To use web identity tokens, the 'sts' service module must be on the class path. 2023-09-04 09:59:57,329 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): software.amazon.awssdk.services.dynamodb.model.DynamoDbException: User: arn:aws:sts::123456789101:assumed-role/safe-drake-test-cluster20230904091517423300000010/i-0bde33149ce682d09 is not authorized to perform: dynamodb:CreateTable on resource: arn:aws:dynamodb:eu-west-1:123456789101:table/Modules because no identity-based policy allows the dynamodb:CreateTable action (Service: DynamoDb, Status Code: 400, Request ID: QQP3NPAQJ9U1UJILGST8IMFDVVVV4KQNSO5AEMVJF66Q9ASUAAJG)
User: arn:aws:sts::123456789101:assumed-role/safe-drake-test-cluster20230904091517423300000010/i-0bde33149ce682d09 is not authorized to perform...
Pod should instead be using the Service Account IAM Role specified in Annotations: "eks.amazonaws.com/role-arn" = aws_iam_role.tapir.arn
The text was updated successfully, but these errors were encountered:
I've deployed Tapir on AWS EKS using Terraform.
Assuming you have a cluster, this is the needed code (might be useful to add this as an example)
The below code will work on a "standard" cluster, but, the service account gets ignored.
To be clear: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html
The service account is not used, the pod has hardcoded a call to the EKS node IAM role.
Adding the needed permissions to the node IAM role allows the deployment to run without issues, but I think it should be allowed/encouraged to use IRSA instead.
Providers:
Tapir:
Tapir pod logs:
2023-09-04 09:59:56,270 INFO [io.quarkus] (main) Installed features: [amazon-dynamodb, amazon-s3, cdi, config-yaml, elasticsearch-rest-client, hibernate-validator, quinoa, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, smallrye-openapi, vertx] 2023-09-04 09:59:56,275 INFO [cor.Bootstrap] (main) Validate GPG key configuration provided 2023-09-04 09:59:56,277 INFO [cor.Bootstrap] (main) Start to bootstrap registry database [dynamodb] 2023-09-04 09:59:56,884 WARN [sof.ama.aws.aut.cre.int.WebIdentityCredentialsUtils] (main) To use web identity tokens, the 'sts' service module must be on the class path. 2023-09-04 09:59:57,329 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): software.amazon.awssdk.services.dynamodb.model.DynamoDbException: User: arn:aws:sts::123456789101:assumed-role/safe-drake-test-cluster20230904091517423300000010/i-0bde33149ce682d09 is not authorized to perform: dynamodb:CreateTable on resource: arn:aws:dynamodb:eu-west-1:123456789101:table/Modules because no identity-based policy allows the dynamodb:CreateTable action (Service: DynamoDb, Status Code: 400, Request ID: QQP3NPAQJ9U1UJILGST8IMFDVVVV4KQNSO5AEMVJF66Q9ASUAAJG)
User: arn:aws:sts::123456789101:assumed-role/safe-drake-test-cluster20230904091517423300000010/i-0bde33149ce682d09 is not authorized to perform...
Pod should instead be using the Service Account IAM Role specified in Annotations:
"eks.amazonaws.com/role-arn" = aws_iam_role.tapir.arn
The text was updated successfully, but these errors were encountered: