diff --git a/cloudtrailbenchmark/packaged.yaml b/cloudtrailbenchmark/packaged.yaml index 59c55d7..62e8a27 100644 --- a/cloudtrailbenchmark/packaged.yaml +++ b/cloudtrailbenchmark/packaged.yaml @@ -43,9 +43,9 @@ Metadata: - benchmark - cloudtrail Name: sumologic-aws-cloudtrail-benchmark - LicenseUrl: s3://appdevstore/cloudtrailbenchmark/v1.0.11/cac1a6df52c685e0f6ebe4ae72078c80 - ReadmeUrl: s3://appdevstore/cloudtrailbenchmark/v1.0.11/8a901bb4fbbe82f128fc502dd3077508 - SemanticVersion: 1.0.11 + LicenseUrl: s3://appdevstore/cloudtrailbenchmark/v1.0.12/cac1a6df52c685e0f6ebe4ae72078c80 + ReadmeUrl: s3://appdevstore/cloudtrailbenchmark/v1.0.12/8a901bb4fbbe82f128fc502dd3077508 + SemanticVersion: 1.0.12 SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/cloudtrailbenchmark Parameters: CollectorName: @@ -127,7 +127,9 @@ Resources: Properties: Location: ApplicationId: arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-app-utils - SemanticVersion: 2.0.1 + SemanticVersion: 2.0.11 + Metadata: + SamResourceId: SumoAppUtils SumoRole: Condition: SetupSumoResources Type: AWS::IAM::Role @@ -164,6 +166,8 @@ Resources: - arn:aws:s3:::${CloudTrailTargetS3BucketName}/* - S3bucketName: Ref: CloudTrailTargetS3BucketName + Metadata: + SamResourceId: SumoRole SumoCloudTrailExportPolicy: Condition: SetUpCloudTrail Type: AWS::S3::BucketPolicy @@ -198,6 +202,8 @@ Resources: - Fn::Sub: arn:aws:s3:::${CloudTrailTargetS3BucketName} DependsOn: - TargetS3Bucket + Metadata: + SamResourceId: SumoCloudTrailExportPolicy SumoCloudTrail: Condition: SetUpCloudTrail Type: Custom::AWSTrail @@ -215,6 +221,8 @@ Resources: Ref: CloudTrailTargetS3BucketName TrailName: Fn::Sub: SumoCloudTrail-${AWS::StackName} + Metadata: + SamResourceId: SumoCloudTrail TargetS3Bucket: Condition: SetUpCloudTrail Type: AWS::S3::Bucket @@ -228,12 +236,16 @@ Resources: - Event: s3:ObjectCreated:Put Topic: Ref: SumoSNSTopic + Metadata: + SamResourceId: TargetS3Bucket SumoSNSTopic: Condition: SetupSumoResources Type: AWS::SNS::Topic Properties: TopicName: Fn::Sub: SumoSNSTopic-${AWS::StackName} + Metadata: + SamResourceId: SumoSNSTopic SumoSNSSubscription: Condition: SetupSumoResources Type: AWS::SNS::Subscription @@ -254,6 +266,8 @@ Resources: numMaxDelayRetries: 5 numNoDelayRetries: 0 backoffFunction: exponential + Metadata: + SamResourceId: SumoSNSSubscription SumoSNSpolicy: Condition: SetupSumoResources Type: AWS::SNS::TopicPolicy @@ -277,6 +291,8 @@ Resources: - Ref: SumoSNSTopic Topics: - Ref: SumoSNSTopic + Metadata: + SamResourceId: SumoSNSpolicy SumoHostedCollector: Condition: SetupSumoResources Type: Custom::Collector @@ -300,6 +316,8 @@ Resources: Ref: SumoDeployment DependsOn: - SumoAppUtils + Metadata: + SamResourceId: SumoHostedCollector SumoS3Source: Condition: SetupSumoResources Type: Custom::AWSSource @@ -337,6 +355,8 @@ Resources: - Arn DependsOn: - SumoAppUtils + Metadata: + SamResourceId: SumoS3Source SumoCloudTrailBenchmarkApp: Type: Custom::App Properties: @@ -363,6 +383,8 @@ Resources: Ref: SumoDeployment DependsOn: - SumoAppUtils + Metadata: + SamResourceId: SumoCloudTrailBenchmarkApp SumoGISCloudTrailDevOpsApp: Type: Custom::App Properties: @@ -389,6 +411,8 @@ Resources: Ref: SumoDeployment DependsOn: - SumoAppUtils + Metadata: + SamResourceId: SumoGISCloudTrailDevOpsApp Outputs: CloudTrailBenchmarkAppFolder: Description: Folder Name diff --git a/cloudtrailbenchmark/template.yaml b/cloudtrailbenchmark/template.yaml index 06de302..84a8cb9 100644 --- a/cloudtrailbenchmark/template.yaml +++ b/cloudtrailbenchmark/template.yaml @@ -49,7 +49,7 @@ Metadata: Name: sumologic-aws-cloudtrail-benchmark LicenseUrl: ./LICENSE ReadmeUrl: ./README.md - SemanticVersion: 1.0.11 + SemanticVersion: 1.0.12 SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/cloudtrailbenchmark @@ -123,7 +123,7 @@ Resources: Properties: Location: ApplicationId: arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-app-utils - SemanticVersion: 2.0.1 + SemanticVersion: 2.0.11 SumoRole: Condition: SetupSumoResources @@ -257,7 +257,7 @@ Resources: - sns:Publish Condition: StringEquals: - aws:SourceAccount: !Ref "AWS::AccountId" + aws:SourceAccount: !Ref AWS::AccountId ArnLike: aws:SourceArn: !Sub "arn:aws:s3:::${CloudTrailTargetS3BucketName}" Effect: Allow @@ -273,7 +273,7 @@ Resources: Type: Custom::Collector Properties: ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region CollectorType: Hosted RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack CollectorName: !Ref CollectorName @@ -290,7 +290,7 @@ Resources: Properties: SourceType: AwsCloudTrailBucket ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region SourceName: !Ref SourceName TargetBucketName: !Ref CloudTrailTargetS3BucketName RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack @@ -309,7 +309,7 @@ Resources: Type: Custom::App Properties: ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region AppName: "Global Intelligence for AWS CloudTrail" AppId: "570bdc0d-f824-4fcb-96b2-3230d4497180" RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack @@ -328,7 +328,7 @@ Resources: Type: Custom::App Properties: ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region AppName: "Global Intelligence for CloudTrail DevOps" AppId: "c7e195de-f169-460a-8e8b-7bb23af0ee5e" RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack diff --git a/cloudtrailbenchmark/testdeploy.sh b/cloudtrailbenchmark/testdeploy.sh index ec18cac..b10b59e 100644 --- a/cloudtrailbenchmark/testdeploy.sh +++ b/cloudtrailbenchmark/testdeploy.sh @@ -1,5 +1,7 @@ #!/bin/bash +export AWS_PROFILE="prod" +export AWS_REGION="us-east-1" if [ "$AWS_PROFILE" == "prod" ] then SAM_S3_BUCKET="appdevstore" @@ -10,9 +12,9 @@ else fi uid=$(cat /dev/random | LC_CTYPE=C tr -dc "[:lower:]" | head -c 6) -version="1.0.11" +version="1.0.12" -sam package --template-file template.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "cloudtrailbenchmark/v$version" +sam package --template-file template.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "cloudtrailbenchmark/v$version" --region $AWS_REGION --profile $AWS_PROFILE sam publish --template packaged.yaml --region $AWS_REGION --semantic-version $version diff --git a/cloudwatchevents/guarddutybenchmark/deploy.sh b/cloudwatchevents/guarddutybenchmark/deploy.sh index bcf0065..3d8b18a 100644 --- a/cloudwatchevents/guarddutybenchmark/deploy.sh +++ b/cloudwatchevents/guarddutybenchmark/deploy.sh @@ -1,6 +1,7 @@ #!/bin/bash export AWS_PROFILE="prod" +export AWS_REGION="us-east-1" if [ "$AWS_PROFILE" == "prod" ] then SAM_S3_BUCKET="appdevstore" @@ -10,7 +11,7 @@ else AWS_REGION="us-east-2" fi -version="1.0.12" +version="1.0.13" echo "Creating package.yaml" sam package --template-file template_v2.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "guarddutybenchmark/v"$version --region $AWS_REGION --profile $AWS_PROFILE diff --git a/cloudwatchevents/guarddutybenchmark/packaged.yaml b/cloudwatchevents/guarddutybenchmark/packaged.yaml index d15e048..5649f8f 100644 --- a/cloudwatchevents/guarddutybenchmark/packaged.yaml +++ b/cloudwatchevents/guarddutybenchmark/packaged.yaml @@ -3,7 +3,6 @@ Transform: AWS::Serverless-2016-10-31 Description: 'This function is invoked by AWS CloudWatch events in response to state change in your AWS resources which matches a event target definition. The event payload received is then forwarded to Sumo Logic HTTP source endpoint. - ' Globals: Function: @@ -53,9 +52,9 @@ Metadata: - benchmark - guardduty Name: sumologic-guardduty-benchmark - LicenseUrl: s3://appdevstore/guarddutybenchmark/v1.0.12/6092dd6c323e33634657102f570628e0 - ReadmeUrl: s3://appdevstore/guarddutybenchmark/v1.0.12/cab012d7fb7887671b751e6f5c0d2062 - SemanticVersion: 1.0.12 + LicenseUrl: s3://appdevstore/guarddutybenchmark/v1.0.13/6092dd6c323e33634657102f570628e0 + ReadmeUrl: s3://appdevstore/guarddutybenchmark/v1.0.13/cab012d7fb7887671b751e6f5c0d2062 + SemanticVersion: 1.0.13 SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/cloudwatchevents/guarddutybenchmark SpdxLicenseId: Apache-2.0 Parameters: @@ -96,7 +95,7 @@ Parameters: Resources: CloudWatchEventFunction: Properties: - CodeUri: s3://appdevstore/guarddutybenchmark/v1.0.12/22b7b226ca9ec3b9dbb28b94c0e5f824 + CodeUri: s3://appdevstore/guarddutybenchmark/v1.0.13/22b7b226ca9ec3b9dbb28b94c0e5f824 Environment: Variables: SUMO_ENDPOINT: @@ -120,7 +119,7 @@ Resources: Properties: Location: ApplicationId: arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-app-utils - SemanticVersion: 2.0.6 + SemanticVersion: 2.0.11 Metadata: SamResourceId: SumoAppUtils SumoHostedCollector: diff --git a/cloudwatchevents/guarddutybenchmark/template_v2.yaml b/cloudwatchevents/guarddutybenchmark/template_v2.yaml index 73c6b16..b405fc7 100644 --- a/cloudwatchevents/guarddutybenchmark/template_v2.yaml +++ b/cloudwatchevents/guarddutybenchmark/template_v2.yaml @@ -56,7 +56,7 @@ Metadata: Name: sumologic-guardduty-benchmark LicenseUrl: ../LICENSE ReadmeUrl: ./README.md - SemanticVersion: 1.0.12 + SemanticVersion: 1.0.13 SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/cloudwatchevents/guarddutybenchmark SpdxLicenseId: Apache-2.0 @@ -118,13 +118,13 @@ Resources: Properties: Location: ApplicationId: arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-app-utils - SemanticVersion: 2.0.6 + SemanticVersion: 2.0.11 SumoHostedCollector: Type: Custom::Collector Properties: ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region CollectorType: Hosted RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack CollectorName: !Ref CollectorName @@ -136,7 +136,7 @@ Resources: Type: Custom::HTTPSource Properties: ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region SourceName: !Ref SourceName RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack SourceCategory: !Ref SourceCategoryName @@ -151,7 +151,7 @@ Resources: Type: Custom::App Properties: ServiceToken: !GetAtt SumoAppUtils.Outputs.SumoAppUtilsFunction - Region: !Ref "AWS::Region" + Region: !Ref AWS::Region AppName: "Global Intelligence for Amazon GuardDuty" AppId: "8e7efcb3-040a-4a92-9f8d-922fafb24afb" RemoveOnDeleteStack: !Ref RemoveSumoResourcesOnDeleteStack diff --git a/sumologic-app-utils/deploy.sh b/sumologic-app-utils/deploy.sh index 2effaea..8595b78 100644 --- a/sumologic-app-utils/deploy.sh +++ b/sumologic-app-utils/deploy.sh @@ -1,5 +1,7 @@ #!/bin/bash +export AWS_PROFILE="prod" +export AWS_REGION="us-east-1" if [ "$AWS_PROFILE" == "prod" ] then SAM_S3_BUCKET="appdevstore" @@ -26,7 +28,7 @@ if [ ! -f sumo_app_utils.zip ]; then rm -r python fi -version="2.0.15" +version="2.0.11" aws s3 cp sumo_app_utils.zip s3://$SAM_S3_BUCKET/sumo_app_utils/v"$version"/sumo_app_utils.zip --region $AWS_REGION --acl public-read diff --git a/sumologic-app-utils/packaged_sumo_app_utils.yaml b/sumologic-app-utils/packaged_sumo_app_utils.yaml index b01d1af..4958c93 100644 --- a/sumologic-app-utils/packaged_sumo_app_utils.yaml +++ b/sumologic-app-utils/packaged_sumo_app_utils.yaml @@ -20,17 +20,17 @@ Metadata: - sumologic - serverless Name: sumologic-app-utils - SemanticVersion: 2.0.10 + SemanticVersion: 2.0.11 SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/sumologic-app-utils SpdxLicenseId: Apache-2.0 - ReadmeUrl: s3://appdevstore/sumo_app_utils/v2.0.10/4d5a92c06a7fa9d956a900e51a1f6be4 + ReadmeUrl: s3://appdevstore/sumo_app_utils/v2.0.11/4d5a92c06a7fa9d956a900e51a1f6be4 Resources: SumoAppUtilsFunction: Type: AWS::Serverless::Function Properties: Handler: main.handler - Runtime: python3.7 - CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip + Runtime: python3.11 + CodeUri: s3://appdevstore/sumo_app_utils/v2.0.11/sumo_app_utils.zip MemorySize: 128 Timeout: 300 Policies: diff --git a/sumologic-app-utils/sumo_app_utils.yaml b/sumologic-app-utils/sumo_app_utils.yaml index 0e56dd5..4964be4 100644 --- a/sumologic-app-utils/sumo_app_utils.yaml +++ b/sumologic-app-utils/sumo_app_utils.yaml @@ -17,7 +17,7 @@ Metadata: - sumologic - serverless Name: sumologic-app-utils - SemanticVersion: 2.0.10 + SemanticVersion: 2.0.11 SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/sumologic-app-utils SpdxLicenseId: Apache-2.0 ReadmeUrl: ./README.md @@ -28,8 +28,8 @@ Resources: Type: 'AWS::Serverless::Function' Properties: Handler: main.handler - Runtime: python3.7 - CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip + Runtime: python3.11 + CodeUri: s3://appdevstore/sumo_app_utils/v2.0.11/sumo_app_utils.zip MemorySize: 128 Timeout: 300 Policies: diff --git a/sumologic-app-utils/sumo_app_utils.zip b/sumologic-app-utils/sumo_app_utils.zip index a016e22..5df65d7 100644 Binary files a/sumologic-app-utils/sumo_app_utils.zip and b/sumologic-app-utils/sumo_app_utils.zip differ