Skip to content

Commit b51ae1a

Browse files
authored
Merge pull request #10 from aws-solutions/release/v1.1.2
Changes for v1.1.2
1 parent 71c3228 commit b51ae1a

File tree

20 files changed

+135
-87
lines changed

20 files changed

+135
-87
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To get the version of the solution, you can look at the description of the creat
2525
"Environment": {
2626
"Variables": {
2727
"SOLUTION_ID": "SO0248",
28-
"SOLUTION_VERSION": "v1.1.1"
28+
"SOLUTION_VERSION": "v1.1.2"
2929
}
3030
},
3131
```
@@ -34,7 +34,7 @@ This information is also provided in `source/infrastructure/cdk.json`:
3434

3535
```json
3636
"SOLUTION_ID": "SO0248",
37-
"SOLUTION_VERSION": "v1.1.1",
37+
"SOLUTION_VERSION": "v1.1.2",
3838
```
3939

4040

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.2] - 2025-05-22
9+
10+
- Upgrade Prebid Server Java to v3.25.0
11+
- Upgrade Python dependencies
12+
- Fix anonymized metrics reporting Lambda
13+
814
## [1.1.1] - 2025-03-07
915

1016
- Upgrade to Prebid Server v3.22 and underlying Docker base image

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ If you discover a potential security issue in this project we ask that you notif
5959

6060
See the [LICENSE](https://github.com/aws-solutions/prebid-server-deployment-on-aws/blob/main/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
6161

62-
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
62+
We may ask you to sign a [Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

NOTICE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This software includes third party software subject to the following copyrights:
1515

1616
alpinelinux/docker-alpine under the MIT license.
1717
github.com/prebid/prebid-server-java under the Apache-2.0 license.
18+
attrs under the MIT license.
1819
aws-cdk-asset-awscli-v1 under the Apache-2.0 license.
1920
aws-cdk-asset-kubectl-v20 under the Apache-2.0 license.
2021
aws-cdk-asset-node-proxy-agent-v6 under the Apache-2.0 license.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ If you'd like to use a different container:
173173
* Build and host the solution assets for installation in your account using the process described above
174174
* Change to the `deployment/global-s3-assets` folder on the build workstation
175175
* Open the file `prebid-server-deployment-on-aws.template` in an editor
176-
* Find the line in the template under the Task Definition resource that is `"Image": "public.ecr.aws/aws-solutions/prebid-server:v1.1.1",`
176+
* Find the line in the template under the Task Definition resource that is `"Image": "public.ecr.aws/aws-solutions/prebid-server:v1.1.2",`
177177
* Update the Image property value with your container image URI
178178
* Create the stack by uploading the changed template to the CloudFormation console
179179

deployment/build-s3-dist.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Paramenters:
1010
# - source-bucket-base-name: Name for the S3 bucket location where the template will source the Lambda
1111
# code from. The template will append '-[region_name]' to this bucket name.
12-
# For example: ./build-s3-dist.sh solutions v1.1.1
12+
# For example: ./build-s3-dist.sh solutions v1.1.2
1313
# The template will then expect the source code to be located in the solutions-[region_name] bucket
1414
#
1515
# - solution-name: name of the solution for consistency
@@ -21,7 +21,7 @@
2121
# Check to see if input has been provided:
2222
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
2323
echo "Please provide the base source bucket name, trademark approved solution name and version where the lambda code will eventually reside."
24-
echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.1.1"
24+
echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.1.2"
2525
exit 1
2626
fi
2727

deployment/ecr/prebid-server/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ bootstrap.log
44
sample/configs/prebid-config.yaml
55
.env
66
nw-current-config/
7+
amt-bidder/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"GIT_TAG_VERSION": "3.22.0",
2+
"GIT_TAG_VERSION": "3.25.0",
33
"MVN_CLI_OPTIONS": "-Dmaven.test.skip"
44
}
55

solution-manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: SO0248
22
name: prebid-server-deployment-on-aws
3-
version: v1.1.1
3+
version: v1.1.2
44
cloudformation_templates:
55
- template: prebid-server-deployment-on-aws.template
66
main_template: true

source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/scripts/build_s3_cdk_dist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def validate_version_code(ctx, param, value):
187187
return value
188188
else:
189189
raise click.BadParameter(
190-
"please specifiy major, minor and patch versions, e.g. v1.1.1"
190+
"please specifiy major, minor and patch versions, e.g. v1.1.2"
191191
)
192192

193193

source/infrastructure/cdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
3131
"SOLUTION_NAME": "Prebid Server Deployment on AWS",
3232
"SOLUTION_ID": "SO0248",
33-
"SOLUTION_VERSION": "v1.1.1",
33+
"SOLUTION_VERSION": "v1.1.2",
3434
"METRICS_NAMESPACE": "prebid-server-deployment-on-aws-metrics",
3535
"BUCKET_NAME": "BUCKET_NAME"
3636
}

source/infrastructure/custom_resources/cloudwatch_metrics/cloudwatch_metrics_report.py

Lines changed: 59 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,16 @@ def get_generic_metrics(self, metrics_to_sum, metric_tag=""):
116116
statistics=self.statistics,
117117
dimensions=[{"Name": "stack-name", "Value": STACK_NAME}],
118118
)
119-
data["Data"].update(
120-
self.prepare_metric_data(
119+
metric_data = self.prepare_metric_data(
121120
response=lambda_stat_response,
122121
metric_name=metric_name,
123122
metric_tag=metric_tag,
124123
sum_all_datapoints=False,
125124
)
126-
)
125+
if not metric_data:
126+
raise ValueError(f"No metric data found for metric {metric_name}")
127+
128+
data["Data"].update(metric_data)
127129
except Exception as e:
128130
logger.info(f"Fail to prepare metrics data for {metric_name}. Error: {e}")
129131
continue
@@ -164,16 +166,19 @@ def get_cloudfront_metrics(self):
164166
statistics=self.statistics,
165167
dimensions=cf_cw_metric["Dimensions"],
166168
)
167-
data["Data"].update(
168-
self.prepare_metric_data(
169-
response=cf_response,
170-
metric_name=cf_cw_metric_name,
171-
metric_tag=metric_tag,
172-
)
169+
170+
metric_data = self.prepare_metric_data(
171+
response=cf_response,
172+
metric_name=cf_cw_metric_name,
173+
metric_tag=metric_tag,
173174
)
175+
if not metric_data:
176+
raise ValueError(f"No metric data found for metric {metric_tag}-{cf_cw_metric_name}")
177+
178+
data["Data"].update(metric_data)
179+
174180
metric = f"{metric_tag}-{cf_cw_metric_name}"
175-
if not data["MetricData"].get(metric):
176-
data["MetricData"][metric] = {}
181+
data["MetricData"].setdefault(metric, {})
177182
data["MetricData"][metric].update(
178183
{
179184
"value": data["Data"][metric],
@@ -228,17 +233,18 @@ def get_nat_gateway_metrics(self):
228233
statistics=self.statistics,
229234
dimensions=nat_metric["Dimensions"],
230235
)
231-
232-
data["Data"].update(
233-
self.prepare_metric_data(
234-
response=nat_cw_stat_response,
235-
metric_name=nat_metric_name,
236-
metric_tag=metric_tag,
237-
)
236+
metric_data = self.prepare_metric_data(
237+
response=nat_cw_stat_response,
238+
metric_name=nat_metric_name,
239+
metric_tag=metric_tag,
238240
)
241+
if not metric_data:
242+
raise ValueError(f"No metric data found for metric {metric_tag}-{nat_metric_name}")
243+
244+
data["Data"].update(metric_data)
245+
239246
metric = f"{metric_tag}-{nat_metric_name}"
240-
if not data["MetricData"].get(metric):
241-
data["MetricData"][metric] = {}
247+
data["MetricData"].setdefault(metric, {})
242248
data["MetricData"][metric].update(
243249
{
244250
"value": data["Data"][metric],
@@ -272,16 +278,18 @@ def get_application_elb_metrics(self):
272278
statistics=["SampleCount", "Average", *self.statistics],
273279
dimensions=elb_metric["Dimensions"],
274280
)
275-
data["Data"].update(
276-
self.prepare_metric_data(
277-
response=elb_stat_response,
278-
metric_name=elb_metric_name,
279-
metric_tag=metric_tag,
280-
)
281+
metric_data = self.prepare_metric_data(
282+
response=elb_stat_response,
283+
metric_name=elb_metric_name,
284+
metric_tag=metric_tag,
281285
)
286+
if not metric_data:
287+
raise ValueError(f"No metric data found for metric {metric_tag}-{elb_metric_name}")
288+
289+
data["Data"].update(metric_data)
290+
282291
metric = f"{metric_tag}-{elb_metric_name}"
283-
if not data["MetricData"].get(metric):
284-
data["MetricData"][metric] = {}
292+
data["MetricData"].setdefault(metric, {})
285293
data["MetricData"][metric].update(
286294
{
287295
"value": data["Data"][metric],
@@ -333,25 +341,29 @@ def get_metrics_report(self):
333341

334342
def put_metric_data(self, metric_data):
335343
for metric_name, metric_data_value in metric_data.items():
336-
self.cloudwatch_client.put_metric_data(
337-
Namespace=METRICS_NAMESPACE,
338-
MetricData=[
339-
{
340-
"MetricName": metric_name,
341-
"Dimensions": metric_data_value["dimensions"],
342-
"Unit": metric_data_value["datapoints"]["Unit"],
343-
"Timestamp": metric_data_value["datapoints"]["Timestamp"],
344-
"StatisticValues": {
345-
"SampleCount": metric_data_value["datapoints"][
346-
"SampleCount"
347-
],
348-
"Sum": metric_data_value["datapoints"]["Sum"],
349-
"Minimum": metric_data_value["datapoints"]["Minimum"],
350-
"Maximum": metric_data_value["datapoints"]["Maximum"],
351-
},
352-
}
353-
],
354-
)
344+
try:
345+
self.cloudwatch_client.put_metric_data(
346+
Namespace=METRICS_NAMESPACE,
347+
MetricData=[
348+
{
349+
"MetricName": metric_name,
350+
"Dimensions": metric_data_value["dimensions"],
351+
"Unit": metric_data_value["datapoints"]["Unit"],
352+
"Timestamp": metric_data_value["datapoints"]["Timestamp"],
353+
"StatisticValues": {
354+
"SampleCount": metric_data_value["datapoints"][
355+
"SampleCount"
356+
],
357+
"Sum": metric_data_value["datapoints"]["Sum"],
358+
"Minimum": metric_data_value["datapoints"]["Minimum"],
359+
"Maximum": metric_data_value["datapoints"]["Maximum"],
360+
},
361+
}
362+
],
363+
)
364+
except Exception as e:
365+
logger.info(f"Fail to put metric data on CloudWatch for {metric_name}. Error: {e}")
366+
continue
355367

356368

357369
def event_handler(event, context):

source/infrastructure/prebid_server/container_image_construct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from .docker_configs_construct import DockerConfigsManager
1212

13-
logging.basicConfig()
13+
logging.basicConfig() # NOSONAR
1414
logger = logging.getLogger(__name__)
1515
logger.setLevel(logging.INFO)
1616

source/infrastructure/prebid_server/efs_cleanup_lambda/container_stop_logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def compress_log_file(log_folder_path: Path, log_file_name: str):
5959
/ f"{log_file_name.split('.')[0]}.{utc_time.year}-{utc_time.month:02d}-{utc_time.day:02d}_{utc_time.hour:02d}.log.gz"
6060
)
6161

62-
with tarfile.open(file_to_compress, "w:gz") as tar:
62+
with tarfile.open(file_to_compress, "w:gz") as tar: # NOSONAR
6363
tar.add(log_file_path)
6464

6565
logger.info(f"Log file compressed: {file_to_compress}")

source/infrastructure/prebid_server/stack_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
PVT_SUBNET_NAME = "Prebid-Private"
1111
PUB_SUBNET_NAME = "Prebid-Public"
12-
VPC_CIDR = "10.8.0.0/16"
12+
VPC_CIDR = "10.8.0.0/16" # NOSONAR
1313
CIDR_MASK = 20
1414
MAX_AZS = 2
1515
NAT_GATEWAYS = 2

0 commit comments

Comments
 (0)