AWS Users Manager is a Spring Boot application that retrieves IAM users from an AWS account and exposes them through a REST API. It fetches user details such as username, user ID, MFA status, and group memberships.
- Fetches IAM users from AWS
- Returns user details in JSON format
- Handles exceptions and provides structured error responses
Ensure you have the following installed and configured:
- Java 17 or higher
- Maven 3.9.0 or higher
- AWS CLI configured with appropriate IAM credentials
Clone the repository:
git clone https://github.com/danijeldragicevic/aws-users-manager.git
cd aws-users-manager
Build the project:
mvn clean install
Run the application:
mvn spring-boot:run
Endpoint: GET /users
Example Request:
curl -X GET http://localhost:8080/users
Example Response:
[
{
"userName": "john.doe",
"userId": "AID123456789",
"mfaEnabled": true,
"groups": ["admins", "developers"]
},
{
"userName": "jane.smith",
"userId": "AID987654321",
"mfaEnabled": false,
"groups": []
}
]
The application provides meaningful error responses. Example of a 404 Not Found response:
{
"timestamp": "2024-02-24T12:00:00",
"status": 404,
"message": "Resource not found",
"path": "/invalid-endpoint"
}
The project includes JUnit tests for repositories, services, controllers, and exception handling. Run tests with:
mvn test
Contributions are welcome! Feel free to submit a pull request or open an issue.