-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
@aws-cdk/aws-sesRelated to Amazon Simple Email ServiceRelated to Amazon Simple Email Serviceeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
Add a general grant
method to EmailIdentity
objects, as well as a more specific method for the send email action.
Use Case
When granting send email access to a lambda the grant needs to be constructed manually, including constructing the ARN for the identity. e.g.
Grant.addToPrincipal({
grantee,
actions: ["ses:SendEmail"],
resourceArns: [
this.stack.formatArn({
service: 'ses',
resource: 'identity',
resourceName: '[email protected]',
}),
],
scope: this
})
This is dissimilar to other constructs, which generally expose a grant
method and one or more convenience methods for particularly relevant groups of actions.
Proposed Solution
Implement a grant
and a grantSendEmail
method on EmailIdentity
(and IEmailIdentity
), so that the above use can be accomplished with a simple
const emailIdentity = new EmailIdentity(this, 'Identity', {
identity: Identity.email('[email protected]')
});
emailIdentity.grantSendEmail(grantee);
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.126.0
Environment details (OS name and version, etc.)
Ubuntu 22.04
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-sesRelated to Amazon Simple Email ServiceRelated to Amazon Simple Email Serviceeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2