diff --git a/07_Resources/S3/Emails/bucket.json b/07_Resources/S3/Emails/bucket.json index 562db86..addd206 100644 --- a/07_Resources/S3/Emails/bucket.json +++ b/07_Resources/S3/Emails/bucket.json @@ -9,13 +9,33 @@ "Properties": { "BucketName": { "Fn::Sub": "${EmailRestingPlace}" }, "LifecycleConfiguration": { - "Rules": [{ - "Id": "24h", - "ExpirationInDays": 1, - "NoncurrentVersionExpirationInDays": 1, - "Prefix": "Today/", - "Status": "Enabled" - }] + "Rules": [ + { + "Id": "24h", + "ExpirationInDays": 1, + "NoncurrentVersionExpirationInDays": 1, + "Prefix": "Today/", + "Status": "Enabled" + }, + { + "Id": "Intelligent transition for Inbox", + "Status": "Enabled", + "Prefix": "Inbox/", + "Transition": { + "StorageClass": "INTELLIGENT_TIERING", + "TransitionInDays": 0 + } + }, + { + "Id": "Intelligent transition for Sent", + "Status": "Enabled", + "Prefix": "Sent/", + "Transition": { + "StorageClass": "INTELLIGENT_TIERING", + "TransitionInDays": 0 + } + } + ] }, "NotificationConfiguration": { "LambdaConfigurations": [ diff --git a/CloudFormation.json b/CloudFormation.json index e369e5a..5d211ad 100644 --- a/CloudFormation.json +++ b/CloudFormation.json @@ -3,11 +3,11 @@ "Description": "This stack will create a solution where you get infinite emails using AWS SES and S3.", "Parameters": { "EmailRestingPlace": { - "Description": "The S3 bucket name where the emails will be stored when they come through AWS SES.", + "Description": "The S3 bucket name where the emails will be stored when they come through AWS SES. (This bucket will be made for you)", "Type": "String" }, "CodePipelineBucketName": { - "Description": "The S3 bucket name where CodePipeline will store the artifacts (this is needed only by CP to work, and pass task results to the next stage).", + "Description": "The S3 bucket name where CodePipeline will store the artifacts (this is needed only by CP to work, and pass task results to the next stage) - (This bucket needs to exist already in S3)", "Type": "String" }, "ParamGitHubAccountName": { @@ -121,6 +121,24 @@ "NoncurrentVersionExpirationInDays": 1, "Prefix": "Today/", "Status": "Enabled" + }, + { + "Id": "Intelligent transition for Inbox", + "Status": "Enabled", + "Prefix": "Inbox/", + "Transition": { + "StorageClass": "INTELLIGENT_TIERING", + "TransitionInDays": 0 + } + }, + { + "Id": "Intelligent transition for Sent", + "Status": "Enabled", + "Prefix": "Sent/", + "Transition": { + "StorageClass": "INTELLIGENT_TIERING", + "TransitionInDays": 0 + } } ] }, @@ -293,7 +311,7 @@ "Branch": { "Ref": "Stage" }, - "PollForSourceChanges": true, + "PollForSourceChanges": false, "OAuthToken": { "Ref": "GitHubToken" } @@ -508,6 +526,34 @@ } } }, + "PipelineConverterWebhook": { + "Type": "AWS::CodePipeline::Webhook", + "Properties": { + "Authentication": "GITHUB_HMAC", + "AuthenticationConfiguration": { + "SecretToken": { + "Ref": "GitHubToken" + } + }, + "Filters": [ + { + "JsonPath": "$.ref", + "MatchEquals": "refs/heads/{Branch}" + } + ], + "TargetPipeline": { + "Ref": "PipelineConverter" + }, + "TargetAction": "Material", + "TargetPipelineVersion": { + "Fn::GetAtt": [ + "PipelineConverter", + "Version" + ] + }, + "RegisterWithThirdParty": true + } + }, "CodeBuildConverter": { "Type": "AWS::CodeBuild::Project", "Properties": { @@ -755,7 +801,7 @@ "Branch": { "Ref": "Stage" }, - "PollForSourceChanges": true, + "PollForSourceChanges": false, "OAuthToken": { "Ref": "GitHubToken" } @@ -970,6 +1016,34 @@ } } }, + "PipelineOutboundWebhook": { + "Type": "AWS::CodePipeline::Webhook", + "Properties": { + "Authentication": "GITHUB_HMAC", + "AuthenticationConfiguration": { + "SecretToken": { + "Ref": "GitHubToken" + } + }, + "Filters": [ + { + "JsonPath": "$.ref", + "MatchEquals": "refs/heads/{Branch}" + } + ], + "TargetPipeline": { + "Ref": "PipelineOutbound" + }, + "TargetAction": "Material", + "TargetPipelineVersion": { + "Fn::GetAtt": [ + "PipelineOutbound", + "Version" + ] + }, + "RegisterWithThirdParty": true + } + }, "CodeBuildOutbound": { "Type": "AWS::CodeBuild::Project", "Properties": { @@ -1245,7 +1319,7 @@ "Branch": { "Ref": "Stage" }, - "PollForSourceChanges": true, + "PollForSourceChanges": false, "OAuthToken": { "Ref": "GitHubToken" } @@ -1460,6 +1534,34 @@ } } }, + "PipelineInboundWebhook": { + "Type": "AWS::CodePipeline::Webhook", + "Properties": { + "Authentication": "GITHUB_HMAC", + "AuthenticationConfiguration": { + "SecretToken": { + "Ref": "GitHubToken" + } + }, + "Filters": [ + { + "JsonPath": "$.ref", + "MatchEquals": "refs/heads/{Branch}" + } + ], + "TargetPipeline": { + "Ref": "PipelineInbound" + }, + "TargetAction": "Material", + "TargetPipelineVersion": { + "Fn::GetAtt": [ + "PipelineInbound", + "Version" + ] + }, + "RegisterWithThirdParty": true + } + }, "CodeBuildInbound": { "Type": "AWS::CodeBuild::Project", "Properties": {