-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
@aws-cdk/aws-sesRelated to Amazon Simple Email ServiceRelated to Amazon Simple Email ServicebugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
Describe the bug
SES ReceiptRuleSet S3 action grants too wide permissions
Expected Behavior
Should work as documented
https://docs.aws.amazon.com/ses/latest/dg/receiving-email-permissions.html#receiving-email-permissions-s3
Currently missing the following block:
"Condition":{
"StringEquals":{
"AWS:SourceAccount":"111122223333",
"AWS:SourceArn": "arn:aws:ses:region:111122223333:receipt-rule-set/rule_set_name:receipt-rule/receipt_rule_name"
}
}
Current Behavior
| Template.fromStack(stack).hasResourceProperties('AWS::S3::BucketPolicy', { |
Reproduction Steps
const ruleSet = new ses.ReceiptRuleSet(this, 'RuleSet');
const defaultRule = ruleSet.addRule('DefaultRule', {
recipients: props.recipients,
enabled: true,
});
defaultRule.addAction(new actions.S3({
bucket: new s3.Bucket(this, 'EmailBucket', {
removalPolicy: cdk.RemovalPolicy.DESTROY,
bucketName: props.bucketName,
}),
}));Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.137.0
Framework Version
No response
Node.js Version
20
OS
all
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-sesRelated to Amazon Simple Email ServiceRelated to Amazon Simple Email ServicebugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2