Because "password123" is a cry for help.
This project uses the aws-serverless-java-container library to run a full Spring Boot 3 application inside AWS Lambda. It demonstrates how to expose standard HTTP endpoints via AWS Lambda Function URLs without managing a dedicated server or complex API Gateway configuration.
- Serverless Architecture: Runs entirely on AWS Lambda.
- Stateless: Pure Java logic with no database dependency.
- REST API: Exposes endpoints via standard HTTP methods.
- Roast Engine: Returns a commentary string with every generated password.
- Java 17
- Maven 3.8+
- AWS Account
Follow these steps to deploy the application manually using the AWS Console.
Clone the repository and build the deployable zip file using Maven.
git clone https://github.com/HBrahmbhatt/aws-lambda-pwd-generator
cd aws-lambda-pwd-generator
mvn clean install- Log in to the AWS Management Console and navigate to the Lambda service.
- Click Create function.
- Select Author from scratch.
- Enter a Function name (e.g.,
password-generator). - Set Runtime to Java 17.
- Set Architecture to x86_64 (or arm64 if you configured your build for it).
- Click Create function.
- Navigate to the Code tab.
- Click Upload from and select .zip or .jar file.
- Upload the zip/JAR file generated in Step 1.
- Click Save.
- In the Code tab, scroll down to Runtime settings and click Edit.
- Change the Handler to match your bridge class:
aws_lambda_springboot.aws_lambda_springboot_project.StreamLambdaHandler::handleRequest - Click Save.
Spring Boot requires more resources than the default Lambda settings provide.
- Navigate to the Configuration tab.
- Select General configuration from the left menu and click Edit.
- Set Memory to 512 MB (or higher).
- Set Timeout to 30 seconds.
- Click Save.
- In the Configuration tab, select Function URL from the left menu.
- Click Create function URL.
- Set Auth type to NONE (allows public access).
- Click Save.
Copy the Function URL provided on the screen and open it in your web browser or Postman app. You should receive a JSON response containing a password and a roast as below.
