From 681a50838d380cf384007955324d40af0cfadeee Mon Sep 17 00:00:00 2001 From: Veetaha Date: Fri, 22 May 2026 14:47:16 +0000 Subject: [PATCH] Remove `CrossAccount` parameter on the s3 changelog --- elastio-s3-changelog/README.md | 33 +++++++--------- ...ormation-multiple-buckets-with-macros.yaml | 4 -- .../cloudformation-multiple-buckets.yaml | 14 +------ .../cloudformation-single-bucket.yaml | 38 +------------------ elastio-s3-changelog/version | 2 +- 5 files changed, 17 insertions(+), 74 deletions(-) diff --git a/elastio-s3-changelog/README.md b/elastio-s3-changelog/README.md index fda59eb..e4cfb93 100644 --- a/elastio-s3-changelog/README.md +++ b/elastio-s3-changelog/README.md @@ -16,31 +16,26 @@ Then, the Elastio `iscan` job reads those events to perform the scanning of new **Important!** You can change the stack name, but it **MUST** start with `elastio-`. Otherwise, Elastio won't be able to access the created resources. - * [us-east-1](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [us-east-2](https://us-east-2.console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [us-west-1](https://us-west-1.console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [us-west-2](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [eu-central-1](https://eu-central-1.console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [eu-west-1](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [eu-west-2](https://eu-west-2.console.aws.amazon.com/cloudformation/home?region=eu-west-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [eu-west-3](https://eu-west-3.console.aws.amazon.com/cloudformation/home?region=eu-west-3#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [ca-central-1](https://ca-central-1.console.aws.amazon.com/cloudformation/home?region=ca-central-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [ap-south-1](https://ap-south-1.console.aws.amazon.com/cloudformation/home?region=ap-south-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [ap-southeast-1](https://ap-southeast-1.console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [ap-southeast-2](https://ap-southeast-2.console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) - * [me-central-1](https://me-central-1.console.aws.amazon.com/cloudformation/home?region=me-central-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v3/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [us-east-1](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [us-east-2](https://us-east-2.console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [us-west-1](https://us-west-1.console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [us-west-2](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [eu-central-1](https://eu-central-1.console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [eu-west-1](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [eu-west-2](https://eu-west-2.console.aws.amazon.com/cloudformation/home?region=eu-west-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [eu-west-3](https://eu-west-3.console.aws.amazon.com/cloudformation/home?region=eu-west-3#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [ca-central-1](https://ca-central-1.console.aws.amazon.com/cloudformation/home?region=ca-central-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [ap-south-1](https://ap-south-1.console.aws.amazon.com/cloudformation/home?region=ap-south-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [ap-southeast-1](https://ap-southeast-1.console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [ap-southeast-2](https://ap-southeast-2.console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) + * [me-central-1](https://me-central-1.console.aws.amazon.com/cloudformation/home?region=me-central-1#/stacks/create/review?templateURL=https://elastio-prod-artifacts-us-east-2.s3.us-east-2.amazonaws.com/contrib/elastio-s3-changelog/v4/cloudformation-multiple-buckets.yaml&stackName=elastio-s3-changelog) 3. Fill in the main parameters: * *BucketNames* - comma-separated list of S3 bucket names; - * *CrossAccount* - set this to true if the scan happens in a different AWS account than the - S3 bucket (i.e. you are using a centralized scanning account). If it is not set - to true in the cross-account case, an error about missing AWS Lambda functions - will occur during stack creation. - * *ScanExistingObjects* - if set to true, the full initial scan of the bucket will be performed. If set to false, only new objects in the bucket will be scanned. - This option can only be enabled when CrossAccount is false. If it is not set + This option can only be enabled in non-cross-account scenario. If it is not set to false in the cross-account case, an error about missing AWS Lambda functions will occur during stack creation. diff --git a/elastio-s3-changelog/cloudformation-multiple-buckets-with-macros.yaml b/elastio-s3-changelog/cloudformation-multiple-buckets-with-macros.yaml index 1805801..82166f2 100644 --- a/elastio-s3-changelog/cloudformation-multiple-buckets-with-macros.yaml +++ b/elastio-s3-changelog/cloudformation-multiple-buckets-with-macros.yaml @@ -10,9 +10,6 @@ Transform: Parameters: BucketNames: Type: String - CrossAccount: - Type: String - Default: "false" ScanExistingObjects: Type: String Default: "false" @@ -33,7 +30,6 @@ Resources: Properties: Parameters: BucketName: !Ref BucketName - CrossAccount: !Ref CrossAccount ScanExistingObjects: !Ref ScanExistingObjects KeyPrefixes: !Ref KeyPrefixes DisableEventCollection: !Ref DisableEventCollection diff --git a/elastio-s3-changelog/cloudformation-multiple-buckets.yaml b/elastio-s3-changelog/cloudformation-multiple-buckets.yaml index eaebc3b..12721c2 100644 --- a/elastio-s3-changelog/cloudformation-multiple-buckets.yaml +++ b/elastio-s3-changelog/cloudformation-multiple-buckets.yaml @@ -12,16 +12,6 @@ Parameters: Comma-delimited list of S3 bucket names. Example: examplebucket1, examplebucket2 - CrossAccount: - Type: String - AllowedValues: ["true", "false"] - Default: "false" - Description: > - Set this to true if the scan happens in a different AWS account than the - S3 bucket (i.e. you are using a centralized scanning account). If it is not set - to true in the cross-account case, an error about missing AWS Lambda functions - will occur during stack creation. - ScanExistingObjects: Type: String AllowedValues: ["true", "false"] @@ -29,7 +19,7 @@ Parameters: Description: > If set to true, the full initial scan of the bucket will be performed. If set to false, only new objects in the bucket will be scanned. - This option can only be enabled when CrossAccount is false. If it is not set + This option can only be enabled in non-cross-account scenario. If it is not set to false in the cross-account case, an error about missing AWS Lambda functions will occur during stack creation. @@ -63,7 +53,6 @@ Metadata: - Label: { default: Main Parameters } Parameters: - BucketNames - - CrossAccount - ScanExistingObjects - KeyPrefixes @@ -78,7 +67,6 @@ Resources: Properties: Parameters: BucketNames: !Join [",", !Ref BucketNames] - CrossAccount: !Ref CrossAccount ScanExistingObjects: !Ref ScanExistingObjects KeyPrefixes: !Join [",", !Ref KeyPrefixes] DisableEventCollection: !Ref DisableEventCollection diff --git a/elastio-s3-changelog/cloudformation-single-bucket.yaml b/elastio-s3-changelog/cloudformation-single-bucket.yaml index f5bd243..01e4f53 100644 --- a/elastio-s3-changelog/cloudformation-single-bucket.yaml +++ b/elastio-s3-changelog/cloudformation-single-bucket.yaml @@ -9,16 +9,6 @@ Parameters: ConstraintDescription: Bucket name must be at least 3 characters long. Description: S3 bucket name. - CrossAccount: - Type: String - AllowedValues: ["true", "false"] - Default: "false" - Description: > - Set this to true if the scan happens in a different AWS account than the - S3 bucket (i.e. you are using a centralized scanning account). If it is not set - to true in the cross-account case, an error about missing AWS Lambda functions - will occur during stack creation. - ScanExistingObjects: Type: String AllowedValues: ["true", "false"] @@ -26,7 +16,7 @@ Parameters: Description: > If set to true, the full initial scan of the bucket will be performed. If set to false, only new objects in the bucket will be scanned. - This option can only be enabled when CrossAccount is false. If it is not set + This option can only be enabled in non-cross-account scenario. If it is not set to false in the cross-account case, an error about missing AWS Lambda functions will occur during stack creation. @@ -62,7 +52,6 @@ Metadata: - Label: { default: Main Parameters } Parameters: - BucketName - - CrossAccount - ScanExistingObjects - KeyPrefixes @@ -72,7 +61,6 @@ Metadata: - EnableDlq Conditions: - NotCrossAccount: !Equals [!Ref CrossAccount, "false"] ScanExistingObjects: !Equals [!Ref ScanExistingObjects, "true"] DisableEventCollection: !Equals [!Ref DisableEventCollection, "true"] EnableDlq: !Equals [!Ref EnableDlq, "true"] @@ -190,30 +178,6 @@ Resources: Tags: "elastio:resource": "true" - queueRefreshSchedule: - Type: AWS::Scheduler::Schedule - Condition: NotCrossAccount - Properties: - Description: A schedule to invoke the periodic changelog queue refresh lambda - ScheduleExpression: cron(0/15 * * * ? *) - FlexibleTimeWindow: - Mode: "OFF" - State: !If - - DisableEventCollection - - DISABLED - - ENABLED - Target: - Arn: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:elastio-s3-changelog-handler-refresh" - RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/ElastioS3ChangelogSchedulerExecution" - Input: !Sub > - { - "queue_url": "${queue}", - "queue_name": "${queue.QueueName}" - } - RetryPolicy: - MaximumEventAgeInSeconds: 60 - MaximumRetryAttempts: 3 - scanExistingObjectsCustom: Type: Custom::ScanExistingObjects Condition: ScanExistingObjects diff --git a/elastio-s3-changelog/version b/elastio-s3-changelog/version index 29ef827..c694117 100644 --- a/elastio-s3-changelog/version +++ b/elastio-s3-changelog/version @@ -1 +1 @@ -v3 +v4