diff --git a/provider/indexer-aws/CloudFormation/Automated/ecs.yml b/provider/indexer-aws/CloudFormation/Automated/ecs.yml index 91db49f4c8c111cc1ee4cc9de40589a64f6ed967..4c1f6bd816e3df710319c07d17102272fe534480 100644 --- a/provider/indexer-aws/CloudFormation/Automated/ecs.yml +++ b/provider/indexer-aws/CloudFormation/Automated/ecs.yml @@ -378,9 +378,9 @@ Resources: - ContainerPort: 80 Environment: # TODO: secure the sources of these values - Name: AWS_ACCESS_KEY_ID - Value: '{{resolve:secretsmanager:dev-MavenS3RepositoryIamCredentials:SecretString:access_key}}' + Value: '{{resolve:secretsmanager:dev-IndexerServiceIamCredentials:SecretString:access_key}}' - Name: AWS_SECRET_KEY - Value: '{{resolve:secretsmanager:dev-MavenS3RepositoryIamCredentials:SecretString:secret_key}}' + Value: '{{resolve:secretsmanager:dev-IndexerServiceIamCredentials:SecretString:access_key}}' - Name: ENVIRONMENT Value: dev - Name: VSTS_FEED_TOKEN diff --git a/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueue.java b/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueue.java index 6e822e378f76ab9466f90d7ea0ac0c99f3b7a261..24fc366f13665097b513205f9439f0cd0cf6880b 100644 --- a/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueue.java +++ b/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueue.java @@ -82,6 +82,7 @@ public class IndexerQueue { ThreadPoolExecutor executorPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(environmentVariables.maxIndexThreads); final String deadLetterQueueUrl = sqsClient.getQueueUrl(environmentVariables.deadLetterQueueName).getQueueUrl(); + System.out.println(deadLetterQueueUrl); List<Message> messages = IndexerQueueService.getMessages(sqsClient, environmentVariables.queueName, environmentVariables.maxBatchRequestCount, environmentVariables.maxMessagesAllowed); // logRequest.getLogEvents().add(new InputLogEvent().withMessage(String.format("Processing %s messages from storage queue", messages.size()))); diff --git a/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueueService.java b/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueueService.java index 0b41528fac537858503d60a9de4ab705c7e0a380..06c907e09dfa0d4223983fe65060babfb6a9f847 100644 --- a/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueueService.java +++ b/provider/indexer-aws/indexer-queue-aws/src/main/java/org/opengroup/osdu/indexerqueue/aws/api/IndexerQueueService.java @@ -72,6 +72,8 @@ public class IndexerQueueService { public static List<Message> getMessages(AmazonSQS sqsClient, String queueName, int numOfmessages, int maxMessageCount){ final String sqsQueueUrl = sqsClient.getQueueUrl(queueName).getQueueUrl(); + System.out.println("inside get messages"); + System.out.println(sqsQueueUrl); int numOfMessages = numOfmessages; List<Message> messages = new ArrayList<>(); do {