Skip to content

Commit

Permalink
Merge pull request #26 from 0x4447/development
Browse files Browse the repository at this point in the history
Added life time policy
  • Loading branch information
davidgatti authored Aug 27, 2019
2 parents a964367 + aceb63f commit c1a24de
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 12 deletions.
34 changes: 27 additions & 7 deletions 07_Resources/S3/Emails/bucket.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
112 changes: 107 additions & 5 deletions CloudFormation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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
}
}
]
},
Expand Down Expand Up @@ -293,7 +311,7 @@
"Branch": {
"Ref": "Stage"
},
"PollForSourceChanges": true,
"PollForSourceChanges": false,
"OAuthToken": {
"Ref": "GitHubToken"
}
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -755,7 +801,7 @@
"Branch": {
"Ref": "Stage"
},
"PollForSourceChanges": true,
"PollForSourceChanges": false,
"OAuthToken": {
"Ref": "GitHubToken"
}
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -1245,7 +1319,7 @@
"Branch": {
"Ref": "Stage"
},
"PollForSourceChanges": true,
"PollForSourceChanges": false,
"OAuthToken": {
"Ref": "GitHubToken"
}
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit c1a24de

Please sign in to comment.