Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow custom key names for AWS SES SMTP credentials in Secrets Manager #1478

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisivo
Copy link

Description of Changes

This PR introduces the ability to specify custom key names when storing the AWS SES SMTP server username and password in AWS Secrets Manager. Previously, the library defaulted to using Credentials.USERNAME and Credentials.PASSWORD as the keys. With this update:

  1. New Properties:

    • Added userNameSecretKey and passwordSecretKey properties to the SesSmtpCredentialsProps interface.
    • These allow users to define custom key names for storing the username and password in Secrets Manager.
  2. Handler Changes:

    • Updated the credentials-handler.lambda.ts to utilize the custom key names if provided.
    • Fallback to the default keys (Credentials.USERNAME and Credentials.PASSWORD) when the custom keys are not specified.
  3. Documentation:

    • Updated the API documentation to reflect these changes.

Why These Changes?

These enhancements provide greater flexibility when integrating the library into projects with specific naming conventions or requirements for secret storage (specifically the .Net NuGet library I am using to read AWS secrets into configuration). This reduces potential conflicts and aligns with best practices for customizability.

Breaking Changes

No breaking changes. The library retains its default behavior if the new properties are not specified.

Testing

  • Verified that the handler correctly uses custom key names when specified.
  • Ensured fallback behavior works seamlessly when the new properties are omitted.

(Please note: This is my first ever PR :) While I had help from AI with this PR template, the code itself is definitely not AI generated! I also would be happy to implement the "update" functionality in the custom resource handler after this PR is complete. Thanks, CI)

@chrisivo chrisivo changed the title Updates construct to accept optional key names, Lambda handler to use… feat: allow custom key names for AWS SES SMTP credentials in Secrets Manager Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant