Feature/secure serverless arch - #18
Merged
IsaacTai13 merged 15 commits intoNov 13, 2025
Merged
Conversation
- Created IAM role and attached least privilege policies for Lambda (logs, SES, secrets) - Created SNS topic 'user-signup-topic' and subscribed Lambda as subscriber - Added Lambda permission allowing SNS to invoke the function
- data source to zip lambda source from ../serverless - created lambda func using Node.js 20 runtime - config env vars (FROM_EMAIL, VERIFY_URL_BASE) - Included source_code_hash for automatic function update when zip content changes
- Created DynamoDB table 'SentEmails' with messageId as primary key - Added IAM policy to grant Lambda dynamodb:GetItem and dynamodb:PutItem permissions - Inserted messageId after successful delivery to avoid duplicates
- using `terraform init -upgrade` cmd - Updated .terraform.lock.hcl to latest compatible provider versions - Ensures consistent provider versions across environments
- RDS, EC2, SecretManager, S3
- Avoid using AWS-managed default keys and instead use customer-managed keys
- to control all encryption and description for our resources
…Manager - Stored Mailgun API key securely in Secrets Manager instead of Lambda env vars - Correct KMS decrypt target resources - Updated Lambda IAM role to allow `secretsmanager:GetSecretValue` and `kms:Decrypt`
- change SNS topic using arn instead of name - fetch AWS account ID via aws_caller_identity - pass it into user_data for runtime configuration
- Adjust format - Add comment
- Added HTTPS listener on port 443 using ACM certificate - Ensured ALB forwards only HTTPS requests to target group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.