https://github.com/danijeldragicevic/aws-users-manager
Spring Boot application to fetch AWS IAM users via a REST API
https://github.com/danijeldragicevic/aws-users-manager
aws-iam dva-c02 spring-boot spring-rest
Last synced: about 1 month ago
JSON representation
Spring Boot application to fetch AWS IAM users via a REST API
- Host: GitHub
- URL: https://github.com/danijeldragicevic/aws-users-manager
- Owner: danijeldragicevic
- License: apache-2.0
- Created: 2025-02-26T23:28:13.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-26T23:35:15.000Z (11 months ago)
- Last Synced: 2025-02-27T00:30:42.286Z (11 months ago)
- Topics: aws-iam, dva-c02, spring-boot, spring-rest
- Language: Java
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS Users Manager
## Overview
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.
## Features
- Fetches IAM users from AWS
- Returns user details in JSON format
- Handles exceptions and provides structured error responses
## Prerequisites
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
## Installation & Setup
Clone the repository:
```commandline
git clone https://github.com/danijeldragicevic/aws-users-manager.git
cd aws-users-manager
```
Build the project:
```commandline
mvn clean install
```
Run the application:
```commandline
mvn spring-boot:run
```
## API Usage
### Get all IAM users
Endpoint: `GET /users`
Example Request:
```commandline
curl -X GET http://localhost:8080/users
```
Example Response:
```commandline
[
{
"userName": "john.doe",
"userId": "AID123456789",
"mfaEnabled": true,
"groups": ["admins", "developers"]
},
{
"userName": "jane.smith",
"userId": "AID987654321",
"mfaEnabled": false,
"groups": []
}
]
```
## Error Handling
The application provides meaningful error responses.
Example of a 404 Not Found response:
```commandline
{
"timestamp": "2024-02-24T12:00:00",
"status": 404,
"message": "Resource not found",
"path": "/invalid-endpoint"
}
```
## Running Tests
The project includes JUnit tests for repositories, services, controllers, and exception handling.
Run tests with:
```commandline
mvn test
```
## Contributing
Contributions are welcome! Feel free to submit a pull request or open an issue.
## License
[](https://opensource.org/licenses/Apache-2.0)