diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4f02853..173f650 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.0.0 +current_version = 2.1.0 commit = True tag = True message = Bump version: {current_version} → {new_version} diff --git a/Makefile b/Makefile index 582c702..f522b26 100644 --- a/Makefile +++ b/Makefile @@ -7,13 +7,13 @@ target: mkdir -p target copy: - cp src/* target + cp -r src/* target dependencies: pip3 install -r requirements.txt -t target target/cloudwatch2logscale.zip: - (cd target/ && zip -r ../target/v2.0.0_cloudwatch2logscale.zip * ) + (cd target/ && zip -r ../target/v2.1.0_cloudwatch2logscale.zip * ) clean: rm -rf target diff --git a/cloudformation.json b/cloudformation.json index 5ea7dac..b3ec2f7 100644 --- a/cloudformation.json +++ b/cloudformation.json @@ -94,8 +94,8 @@ }, "S3KeyOfTheDeploymentPackageContainingLambdaCodeFiles" : { "Type" : "String", - "Description" : "The name of the S3 key in the S3 bucket containing the lambda code files used for the integration. Change this if you have named the deployment package containing the code files something other than the default 'v2.0.0_cloudwatch2logscale.zip'.", - "Default" : "v2.0.0_cloudwatch2logscale.zip" + "Description" : "The name of the S3 key in the S3 bucket containing the lambda code files used for the integration. Change this if you have named the deployment package containing the code files something other than the default 'v2.1.0_cloudwatch2logscale.zip'.", + "Default" : "v2.1.0_cloudwatch2logscale.zip" } }, "Conditions" : { @@ -263,7 +263,7 @@ "Properties": { "Description" : "Copies objects from a S3 bucket to a destination.", "Handler" : "index.handler", - "Runtime" : "python3.8", + "Runtime" : "python3.12", "Timeout" : "300", "Role" : { "Fn::GetAtt": [ "LogScaleCloudWatchRole", "Arn" ] }, "Code" : { @@ -314,7 +314,7 @@ "Role" : { "Fn::GetAtt" : [ "LogScaleCloudWatchRole", "Arn" ] }, - "Runtime" : "python3.8", + "Runtime" : "python3.12", "Timeout" : "300" } }, @@ -361,7 +361,7 @@ "Role" : { "Fn::GetAtt" : [ "LogScaleCloudWatchRole", "Arn" ] }, - "Runtime" : "python3.8", + "Runtime" : "python3.12", "Timeout" : "300" } }, @@ -412,7 +412,7 @@ "Role" : { "Fn::GetAtt" : [ "LogScaleCloudWatchRole", "Arn" ] }, - "Runtime" : "python3.8", + "Runtime" : "python3.12", "Timeout" : "300" } }, @@ -563,7 +563,7 @@ "Role" : { "Fn::GetAtt" : [ "LogScaleCloudWatchRole", "Arn" ] }, - "Runtime" : "python3.8", + "Runtime" : "python3.12", "Timeout" : "300" } }, @@ -612,7 +612,7 @@ "Role" : { "Fn::GetAtt" : [ "LogScaleCloudWatchRole", "Arn" ] }, - "Runtime" : "python3.8", + "Runtime" : "python3.12", "Timeout" : "300" } }, diff --git a/deploy-using-profile.sh b/deploy-using-profile.sh index b3f9cf3..f4886e7 100755 --- a/deploy-using-profile.sh +++ b/deploy-using-profile.sh @@ -4,4 +4,4 @@ cat cloudformation.json | jq make build aws s3 cp --acl public-read cloudformation.json s3://logscale-public-us-east-1/ --region us-east-1 --profile cloudwatch -aws s3 cp --acl public-read target/v2.0.0_cloudwatch2logscale.zip s3://logscale-public-us-east-1/ --region us-east-1 --profile cloudwatch +aws s3 cp --acl public-read target/v2.1.0_cloudwatch2logscale.zip s3://logscale-public-us-east-1/ --region us-east-1 --profile cloudwatch diff --git a/deploy.sh b/deploy.sh index 9608474..aa5054c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -4,4 +4,4 @@ cat cloudformation.json | jq make build aws s3 cp --acl public-read cloudformation.json s3://logscale-public-us-east-1/ --region us-east-1 -aws s3 cp --acl public-read target/v2.0.0_cloudwatch2logscale.zip s3://logscale-public-us-east-1/ --region us-east-1 \ No newline at end of file +aws s3 cp --acl public-read target/v2.1.0_cloudwatch2logscale.zip s3://logscale-public-us-east-1/ --region us-east-1 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 663bd1f..605dab1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -requests \ No newline at end of file +requests +urllib3==1.26.6 \ No newline at end of file diff --git a/src/helpers.py b/src/helpers.py index 572bbfa..094d26e 100644 --- a/src/helpers.py +++ b/src/helpers.py @@ -188,21 +188,21 @@ def parse_message(message): # Standard out from Lambdas. std_matcher = re.compile( - "\d\d\d\d-\d\d-\d\d\S+\s+(?P\S+)" + r"\d\d\d\d-\d\d-\d\d\S+\s+(?P\S+)" ) # END RequestId: b3be449c-8bd7-11e7-bb30-4f271af95c46 end_matcher = re.compile( - "END RequestId:\s+(?P\S+)" + r"END RequestId:\s+(?P\S+)" ) # START RequestId: b3be449c-8bd7-11e7-bb30-4f271af95c46 # Version: $LATEST start_matcher = re.compile( - "START RequestId:\s+(?P\S+)\s+" - "Version: (?P\S+)" + r"START RequestId:\s+(?P\S+)\s+" + r"Version: (?P\S+)" ) @@ -212,9 +212,9 @@ def parse_message(message): # Memory Size: 128 MB # Max Memory Used: 20 MB report_matcher = re.compile( - "REPORT RequestId:\s+(?P\S+)\s+" - "Duration: (?P\S+) ms\s+" - "Billed Duration: (?P\S+) ms\s+" - "Memory Size: (?P\S+) MB\s+" - "Max Memory Used: (?P\S+) MB" + r"REPORT RequestId:\s+(?P\S+)\s+" + r"Duration: (?P\S+) ms\s+" + r"Billed Duration: (?P\S+) ms\s+" + r"Memory Size: (?P\S+) MB\s+" + r"Max Memory Used: (?P\S+) MB" )