From 13aced8bee0e63a9ed84eb853b38127b22b08b39 Mon Sep 17 00:00:00 2001 From: Nguyen Chi Cong Date: Wed, 30 Aug 2023 08:58:38 +0700 Subject: [PATCH 1/2] cid-cfn.yml: Add validation on CFN parameter S3 bucket path --- cfn-templates/cid-cfn.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/cfn-templates/cid-cfn.yml b/cfn-templates/cid-cfn.yml index 67de84c8..c92c87c2 100644 --- a/cfn-templates/cid-cfn.yml +++ b/cfn-templates/cid-cfn.yml @@ -171,6 +171,7 @@ Parameters: Type: String Description: The S3 path to the bucket created by the Cost Optimization Data Collection Lab. The path will need point to a folder containing /trusted-advisor and/or /compute-optimizer folders. You can leave the variable {account_id} in place, it will be replaced by current account ID automatically. Default: "s3://costoptimizationdata{account_id}" + AllowedPattern: '^s3://[a-z0-9](.)+[a-zA-Z0-9/]$' LambdaLayerBucketPrefix: Type: String Description: An S3 bucket with a Lambda layer From be78154e2f2383b2c2e217944b3e426f800a1319 Mon Sep 17 00:00:00 2001 From: Nguyen Chi Cong Date: Thu, 21 Sep 2023 20:27:32 +0700 Subject: [PATCH 2/2] Update costoptimizationdata bucket regex --- cfn-templates/cid-cfn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfn-templates/cid-cfn.yml b/cfn-templates/cid-cfn.yml index c92c87c2..f4206bdd 100644 --- a/cfn-templates/cid-cfn.yml +++ b/cfn-templates/cid-cfn.yml @@ -171,7 +171,7 @@ Parameters: Type: String Description: The S3 path to the bucket created by the Cost Optimization Data Collection Lab. The path will need point to a folder containing /trusted-advisor and/or /compute-optimizer folders. You can leave the variable {account_id} in place, it will be replaced by current account ID automatically. Default: "s3://costoptimizationdata{account_id}" - AllowedPattern: '^s3://[a-z0-9](.)+[a-zA-Z0-9/]$' + AllowedPattern: '^s3://[a-zA-Z0-9-_{}/]*$' LambdaLayerBucketPrefix: Type: String Description: An S3 bucket with a Lambda layer