Skip to content

Tag: amazon-web-services

‘Profile file contained no credentials for profile’ error when doing PutItem using AWS Java SDK

I’m trying to put an item into a DynamoDB table using the AWS SDK for Java. I am using the example from the docs: When running locally I can put the item successfully, but when I run my application as a task on Fargate, it throws this error: Profile file contained no credentials for profile ‘default’: ProfileFile(profilesAndSectionsMap=[]). Answer

Mapping List to DynamoDB

I’m trying to map to DynamoDB list of dates in Java I have written my own converter but it works only for LocalDateTime but not for the List. Does anyone know how to do it correctly? Should I write separate converter that will return list of strings where each string will be converted from localdatetime? Answer I wrote converter like

Why did I get exception when I access CloudTrail Events ? Thanks

Exception: The security token included in the request is invalid. (Service: AWSCloudTrail; Status Code: 400; Error Code: UnrecognizedClientException; the sample code : awsCredentials (accessKey, SecretAsscessKey) is the temporary credential I got through AssumeRole (RoleA). RoleA has the priviliage to access LookupEvents in CloudTrail. The exception comes from the lookupEvents call. I ensure the credential doesn’t expire when I call

X-Ray trace doesn’t shows inner method call

I’m new to aws x-ray and trying to use x-ray with AOP based approach in a springboot application. I was able to get the traces in the aws console, but traces doesn’t show inner method call method2() details. Am I missing anything here. Controller class Aspect Class When I hit http://localhost:8080/xray/method1 endpoint, AWS Xray Console doesn’t show method2() details Answer

Java Lambda for spring-cloud version to 3.2.3/3.1.7 org/springframework/boot/ApplicationContextFactory: java.lang.NoClassDefFoundError

I’m trying change version for spring-cloud-function-adapter-aws from 3.0.7.RELEASE to either 3.1.7 or 3.2.3 (as Spring Cloud Function Vulnerability CVE-2022-22963) but getting error as it is not able to find the class java.lang.NoClassDefFoundError: org/spring framework/boot/ApplicationContextFactory at at at at at Caused by: java.lang.ClassNotFoundException: My @SpringBootApplication public class Application { } @Configuration public class FunctionConfiguration

How to add a Servlet filter in Vert.x REST API?

I have a REST API which was created purely using Vert.x, I would like to instrument it for AWS X-RAY and in order to do that I need to add a servlet filter. I’m creating a webserver like this: In the documentation for AWS X-RAY they’ve only mentioned Tomcat ( Would adding filters using web.xml work for this as well