Skip to content

SAM apps python 3.7 eol #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions cloudtrailbenchmark/packaged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -164,6 +166,8 @@ Resources:
- arn:aws:s3:::${CloudTrailTargetS3BucketName}/*
- S3bucketName:
Ref: CloudTrailTargetS3BucketName
Metadata:
SamResourceId: SumoRole
SumoCloudTrailExportPolicy:
Condition: SetUpCloudTrail
Type: AWS::S3::BucketPolicy
Expand Down Expand Up @@ -198,6 +202,8 @@ Resources:
- Fn::Sub: arn:aws:s3:::${CloudTrailTargetS3BucketName}
DependsOn:
- TargetS3Bucket
Metadata:
SamResourceId: SumoCloudTrailExportPolicy
SumoCloudTrail:
Condition: SetUpCloudTrail
Type: Custom::AWSTrail
Expand All @@ -215,6 +221,8 @@ Resources:
Ref: CloudTrailTargetS3BucketName
TrailName:
Fn::Sub: SumoCloudTrail-${AWS::StackName}
Metadata:
SamResourceId: SumoCloudTrail
TargetS3Bucket:
Condition: SetUpCloudTrail
Type: AWS::S3::Bucket
Expand All @@ -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
Expand All @@ -254,6 +266,8 @@ Resources:
numMaxDelayRetries: 5
numNoDelayRetries: 0
backoffFunction: exponential
Metadata:
SamResourceId: SumoSNSSubscription
SumoSNSpolicy:
Condition: SetupSumoResources
Type: AWS::SNS::TopicPolicy
Expand All @@ -277,6 +291,8 @@ Resources:
- Ref: SumoSNSTopic
Topics:
- Ref: SumoSNSTopic
Metadata:
SamResourceId: SumoSNSpolicy
SumoHostedCollector:
Condition: SetupSumoResources
Type: Custom::Collector
Expand All @@ -300,6 +316,8 @@ Resources:
Ref: SumoDeployment
DependsOn:
- SumoAppUtils
Metadata:
SamResourceId: SumoHostedCollector
SumoS3Source:
Condition: SetupSumoResources
Type: Custom::AWSSource
Expand Down Expand Up @@ -337,6 +355,8 @@ Resources:
- Arn
DependsOn:
- SumoAppUtils
Metadata:
SamResourceId: SumoS3Source
SumoCloudTrailBenchmarkApp:
Type: Custom::App
Properties:
Expand All @@ -363,6 +383,8 @@ Resources:
Ref: SumoDeployment
DependsOn:
- SumoAppUtils
Metadata:
SamResourceId: SumoCloudTrailBenchmarkApp
SumoGISCloudTrailDevOpsApp:
Type: Custom::App
Properties:
Expand All @@ -389,6 +411,8 @@ Resources:
Ref: SumoDeployment
DependsOn:
- SumoAppUtils
Metadata:
SamResourceId: SumoGISCloudTrailDevOpsApp
Outputs:
CloudTrailBenchmarkAppFolder:
Description: Folder Name
Expand Down
14 changes: 7 additions & 7 deletions cloudtrailbenchmark/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions cloudtrailbenchmark/testdeploy.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion cloudwatchevents/guarddutybenchmark/deploy.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down
11 changes: 5 additions & 6 deletions cloudwatchevents/guarddutybenchmark/packaged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions cloudwatchevents/guarddutybenchmark/template_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion sumologic-app-utils/deploy.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions sumologic-app-utils/packaged_sumo_app_utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions sumologic-app-utils/sumo_app_utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Binary file modified sumologic-app-utils/sumo_app_utils.zip
Binary file not shown.