Skip to content

Commit

Permalink
ses-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jogold committed Feb 24, 2021
1 parent 1e03759 commit 9de2e6d
Showing 1 changed file with 54 additions and 5 deletions.
59 changes: 54 additions & 5 deletions packages/@aws-cdk/aws-ses-actions/test/integ.actions.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"Code": {
"ZipFile": "exports.handler = async (event) => event;"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"FunctionServiceRole675BB04A",
"Arn"
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
},
"DependsOn": [
Expand Down Expand Up @@ -341,16 +341,51 @@
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "exports.handler = function dropSpamCode(event, _, callback) {\n console.log('Spam filter');\n const sesNotification = event.Records[0].ses;\n console.log('SES Notification:\\n', JSON.stringify(sesNotification, null, 2));\n // Check if any spam check failed\n if (sesNotification.receipt.spfVerdict.status === 'FAIL'\n || sesNotification.receipt.dkimVerdict.status === 'FAIL'\n || sesNotification.receipt.spamVerdict.status === 'FAIL'\n || sesNotification.receipt.virusVerdict.status === 'FAIL') {\n console.log('Dropping spam');\n // Stop processing rule set, dropping message\n callback(null, { disposition: 'STOP_RULE_SET' });\n }\n else {\n callback(null, null);\n }\n}"
"S3Bucket": {
"Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3Bucket6AFCBA5F"
},
"S3Key": {
"Fn::Join": [
"",
[
{
"Fn::Select": [
0,
{
"Fn::Split": [
"||",
{
"Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086"
}
]
}
]
},
{
"Fn::Select": [
1,
{
"Fn::Split": [
"||",
{
"Ref": "AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086"
}
]
}
]
}
]
]
}
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4",
"Arn"
]
},
"Runtime": "nodejs10.x"
"Handler": "index.handler",
"Runtime": "nodejs14.x"
},
"DependsOn": [
"SingletonLambda224e77f9a32e4b4dac32983477abba16ServiceRole3037F5B4"
Expand All @@ -372,5 +407,19 @@
}
}
}
},
"Parameters": {
"AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3Bucket6AFCBA5F": {
"Type": "String",
"Description": "S3 bucket for asset \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\""
},
"AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34S3VersionKey02BA9086": {
"Type": "String",
"Description": "S3 key for asset version \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\""
},
"AssetParameters96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34ArtifactHash6BE57680": {
"Type": "String",
"Description": "Artifact hash for asset \"96d0b6be9a64ae309bf89a86f5515453f0fa1d07b4f6b37198051cc98e251f34\""
}
}
}
}

0 comments on commit 9de2e6d

Please sign in to comment.