Feat: Referencing Email across stages
jriquelme opened this issue · comments
version 0.0.403.
How can I use an already verified SES identity domain? (it's already in use by other applications)
const email = new sst.aws.Email("PMEmail", {
sender: "predictablemedia.com",
dns: false,
});
Fails with:
| Creating PMEmail sst:aws:Email → PMEmailIdentity aws:sesv2:EmailIdentity
| Error PMEmail sst:aws:Email → PMEmailIdentity aws:sesv2:EmailIdentity StatusCode: 400, RequestID: 664eb45b-996e-4c9d-a143-bf1e0773a93b, AlreadyExistsException: Email identity predictablemedia.com already exist.
× Failed
PMEmail sst:aws:Email → PMEmailIdentity aws:sesv2:EmailIdentity
StatusCode: 400, RequestID: 664eb45b-996e-4c9d-a143-bf1e0773a93b, AlreadyExistsException: Email identity predictablemedia.com already exist.
Thank you, awesome project!
Usually you would use a separate identity (or email) for a different stage because you don't want to be sending out debug emails out from the same domain or prod domain.
Is there a reason you don't want to do that in this case?
Yes, but I'd expect to take that decision by myself :)
I'm just doing a rapid test, and the idea of having to wait for the verification (up to 72 hours according to the docs) isn't appealing. Indeed I had to do that, and now I'm waiting for some-email@mydomain.com to be ready.
Yeah so the default behaviour with resources is to recreated them per stage. But there are some resources that teams like to share. We are adding support for referencing these resources across stages.