-
Notifications
You must be signed in to change notification settings - Fork 17
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: SMTP credentials set #17
Comments
Hmm. I think this is doable, but it's not entirely clear to me the best way to fit it into CloudFormation. Interestingly, you can almost get SMTP credentials now, just using existing CloudFormation resources. Here's what the SES console does when you use it to create SMTP credentials:
So SES SMTP credentials aren't really a single "resource", but are actually a combination of three provisioned physical resources (IAM user, inline policy, and access key) plus a calculation on the access key's secret (which isn't really provisioning anything new). We could try to package all of this up into a pseudo Another option would be creating a new custom "resource" that just does the SMTP password calculation from step 4 above. It wouldn't really provision anything, but that means it's pretty easy to implement. I'd probably lean toward this approach, with an example nested CF template to provision the other resources. But if you're already running code somewhere (anywhere) in your stack where you'll be sending email, the easiest approach might be to just calculate the SMTP password there. Use CF to provision the IAM user, inline policy, and access key, and provide the access key id and secret to the resource that will be doing SMTP sends. Then in your code that's doing SMTP sends (or init or config for it), use SES's algorithm to calculate the SMTP password from the access key secret. That works right now, without needing any new CF custom resources. |
Amazing answer. I'll give this a shot! |
Problem
Need to automatically generate SMTP credentials to use in another resource (like EC2, ECS environment files)
Solution
Create a new resource for generating and outputting SMTP credentials.
Here it is in the old console (the new one does not have this feature yet):
![image](https://user-images.githubusercontent.com/2539092/148420298-b49a4dc1-0405-47bd-9084-de5fd814f767.png)
Compatibility
No implications - another new resource would be created.
System
Would you be willing to help?
I can help test it.
The text was updated successfully, but these errors were encountered: