This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lambdaFunctionOne = new nodejs_lambda.NodejsFunction(this, "LambdaFunctionOne", { | |
runtime: lambda.Runtime.NODEJS_14_X, | |
entry: path.join(__dirname, `/../lambda/FunctionOne/index.ts`), | |
handler: "handler", | |
timeout: Duration.minutes(10), | |
}); | |
const waitForXMinutes = new sfn.Wait(this, 'Wait', { | |
time: sfn.WaitTime.duration(Duration.minutes(3)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lambdaFunctionOne = new nodejs_lambda.NodejsFunction(this, "LambdaFunctionOne", { | |
runtime: lambda.Runtime.NODEJS_14_X, | |
entry: path.join(__dirname, `/../lambda/FunctionOne/index.ts`), | |
handler: "handler", | |
timeout: Duration.minutes(10), | |
}); | |
const waitForXMinutes = new sfn.Wait(this, 'Wait', { | |
time: sfn.WaitTime.duration(Duration.minutes(3)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is to delete all the log streams within a AWS Cloudwatch Log Group without deleting the group. | |
# Pass the log group name as first paramter to the script. | |
# jq utility required. | |
logGroupName=$1 | |
for i in `aws logs describe-log-streams --log-group-name $logGroupName | jq -r '.[] | .[] | .logStreamName'` | |
do | |
echo "Deleting log stream $i" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### New role creation | |
### Here assume_role_policy MUST be defined for the trust relationship | |
resource "aws_iam_role" "codedeploy_service_role" { | |
name = "CodeDeployServiceRole" | |
assume_role_policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ |