-
AWS SDK version 2 – Error configuring S3 Lifecyle Configuration
I was trying to use the AWS Java SDK version 2 to create an S3 bucket and add a Lifecycle Rule to expire all objects after 14 days. The Developer Guide has a similar example, only that example transitions objects to S3 Glacier. I ended up encountering an error that was of very little help:…
-
AWS Managing large SQS messages using S3 with Java SDK version 2
AWS has a page in their SQS Developer Guide about how to manage large SQS messages using S3. (As of August 4, 2022 the SQS message size limit is 256 KB.) The solution makes use of the Amazon SQS Extended Client Library for Java, which is found in GitHub and any of the central Maven…
-
Fixing the Spring Web error: Expected lookupPath in request attribute “org.springframework.web.util.UrlPathHelper.PATH”
The other day I was upgrading my Spring Boot app from 2.3.1 to 2.6.6 to address the recent Spring vulnerability. This upgraded the dependent Spring libraries from 5.2.7 to 5.3.18. At start-up my application dynamically adds some REST endpoints by adding new RequestMappingInfo objects to the RequestMappingHandlerMapping bean already registered in the application context: When…
-
AWS Lambda – CloudWatch Log Stream not found
I created a Lambda using the Java 11 Corretto Runtime. I executed a test and it was successful, however when I clicked the link to view the logs in CloudWatch, the logs were not there. There was an error about the Log Stream not found or did not exist. The solution turned out to be…
-
AWS CodeBuild Error: Unable to access jarfile
Using AWS CodeBuild, I was using a buildspec that was to run an executable JAR file to execute JUnit tests. Here is my buildspec: As you can see, I am making use of AWS Secrets Manager to get a couple properties that are passed as system variables to the JUnit execution. When this Build would…
-
AWS CloudFormation: AutoScaling Group – You must use a valid fully-formed launch template
I had a AWS CloudFormation template that included an Auto Scaling Group, Launch Template and Security Group. The Auto Scaling Group being created was to use the Launch Template being created. And that Launch Template was to use the Security Group being created. When I created my CloudFormation stack, the stack failed with this error…
-
AWS CloudFormation: Target Group does not have an associated Load Balancer
Yesterday I was using an AWS CloudFormation template to ultimately create an ECS Service (Fargate type), but also create resources including an Application Load Balancer, Target Group and IAM Roles. When the stack was being created, I received the following error: The target group with targetGroupArn arn:aws:elasticloadbalancing:us-east-1:999999995545:targetgroup/MyTargetGroup/999999eb40599999 does not have an associated load balancer. (Service:…
-
Elasticsearch – Ignore special characters in query with pattern replace filter and custom analyzer
Using Elasticsearch 5, we had a field like drivers license number where values may include special characters and inconsistent upper/lower case behavior as the values were entered by the users with limited validation. For example, these are hypothetical values: CA-123-456-789 WI.12345.6789 tx123456789 az-123-xyz-456 … In our application, the end user need to search by that…
-
Elasticsearch 5 Determining if nested field exists
Consider an index with documents such as these, where the team location may or may not be populated: { “status” : “active”, “name” : “Jimmy Chitwood”, “team” : { “name” : “Hickory Huskers”, “location” : “Hickory, Indiana” } } Note how the document has a nested object “team”. With Elastic 5.0, I wanted to run…
-
Elasticsearch deprecation warning: [deprecation.search.aggregations.bucket.terms] sorting by ascending count is deprecated and will be removed in the next major version
I am currently attempting to upgrade from Elasticsearch 2.4.1 to Elasticsearch 5. While running ES 2.4.1 I turned on deprecation logging and executed the following search (which was generated by my application): GET publicaccess/cases/_search { “from” : 0, “size” : 25, “query” : { “bool” : { “must” : { “match_all” : { } }…