Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 99132f9

Browse files
authored
Update to version v1.4.1
- Updated the bucket policy on the logging bucket to grant access to the logging service principal (logging.s3.amazonaws.com) for access log delivery. - Upgraded CDK version to 2.75.0
2 parents 7144ea1 + a33a12e commit 99132f9

File tree

22 files changed

+175
-97
lines changed

22 files changed

+175
-97
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pyvenv.cfg
2727
**/.pytest_cache
2828
**/.coverage
2929
**/coverage-reports/
30+
.coverage.*
3031

3132
# linting, scanning configurations, sonarqube
3233
.scannerwork/

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ 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.4.1] - 2023-04-18
9+
10+
### Changed
11+
12+
- Enabled Amazon S3 server access logging on the logging bucket
13+
- Upgraded CDK version to 2.75.0
14+
815
## [1.4.0] - 2023-03-29
916

1017
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ The following procedures assumes that all the OS-level configuration has been co
609609
- [AWS Command Line Interface](https://aws.amazon.com/cli/)
610610
- [Python](https://www.python.org/) 3.9 or newer
611611
- [Node.js](https://nodejs.org/en/) 16.x or newer
612-
- [AWS CDK](https://aws.amazon.com/cdk/) 2.44.0 or newer
612+
- [AWS CDK](https://aws.amazon.com/cdk/) 2.75.0 or newer
613613
- [Amazon Corretto OpenJDK](https://docs.aws.amazon.com/corretto/) 17.0.4.1
614614

615615
> **Please ensure you test the templates before updating any production deployments.**

source/cdk_solution_helper_py/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This README summarizes using the tool.
1212
Install this package. It requires at least
1313

1414
- Python 3.9
15-
- AWS CDK version 2.44.0 or higher
15+
- AWS CDK version 2.75.0 or higher
1616

1717
To install the packages:
1818

source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from aws_solutions.cdk.context import SolutionContext
1717
from aws_solutions.cdk.stack import SolutionStack
18-
from aws_solutions.cdk.synthesizers import SolutionStackSubstitions
18+
from aws_solutions.cdk.synthesizers import SolutionStackSubstitutions
1919

2020

2121
class CDKSolution:
@@ -31,11 +31,11 @@ class CDKSolution:
3131
def __init__(self, cdk_json_path: Path, qualifier="hnb659fds"):
3232
self.qualifier = qualifier
3333
self.context = SolutionContext(cdk_json_path=cdk_json_path)
34-
self.synthesizer = SolutionStackSubstitions(qualifier=self.qualifier)
34+
self.synthesizer = SolutionStackSubstitutions(qualifier=self.qualifier)
3535

3636
def reset(self) -> None:
3737
"""
3838
Get a new synthesizer for this CDKSolution - useful for testing
3939
:return: None
4040
"""
41-
self.synthesizer = SolutionStackSubstitions(qualifier=self.qualifier, generate_bootstrap_version_rule=False)
41+
self.synthesizer = SolutionStackSubstitutions(qualifier=self.qualifier, generate_bootstrap_version_rule=False)
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
aws-lambda-powertools==2.10.0
2-
aws-xray-sdk==2.11.0
1+
aws-lambda-powertools==2.14.0
2+
aws-xray-sdk==2.12.0

source/cdk_solution_helper_py/helpers_cdk/aws_solutions/cdk/synthesizers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
import re
1717
import shutil
1818
from contextlib import suppress
19-
from dataclasses import field, dataclass
19+
from dataclasses import dataclass, field
2020
from fileinput import FileInput
2121
from pathlib import Path
22-
from typing import List, Dict, Tuple
22+
from typing import Dict, List, Tuple
2323

2424
import jsii
25-
from aws_cdk import IStackSynthesizer, DefaultStackSynthesizer, ISynthesisSession
25+
from aws_cdk import DefaultStackSynthesizer, IStackSynthesizer, ISynthesisSession
2626

2727
logger = logging.getLogger("cdk-helper")
2828

@@ -256,7 +256,7 @@ def save(self, asset_path_global: Path = None, asset_path_regional: Path = None)
256256

257257

258258
@jsii.implements(IStackSynthesizer)
259-
class SolutionStackSubstitions(DefaultStackSynthesizer):
259+
class SolutionStackSubstitutions(DefaultStackSynthesizer):
260260
"""Used to handle AWS Solutions template substitutions and sanitization"""
261261

262262
substitutions = None
@@ -295,11 +295,11 @@ def synthesize(self, session: ISynthesisSession):
295295

296296
logger.info(f"solutions parameter substitution in {session.assembly.outdir} started")
297297
for template in self._template_names(session):
298-
logger.info(f"substutiting parameters in {str(template)}")
298+
logger.info(f"substituting parameters in {str(template)}")
299299
with FileInput(template, inplace=True) as template_lines:
300300
for line in template_lines:
301-
# handle all template subsitutions in the line
302-
for match in SolutionStackSubstitions.substitution_re.findall(line):
301+
# handle all template substitutions in the line
302+
for match in SolutionStackSubstitutions.substitution_re.findall(line):
303303
placeholder = match.replace("%", "")
304304
replacement = self._stack.node.try_get_context(placeholder)
305305
if not replacement:

source/cdk_solution_helper_py/helpers_cdk/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_version():
5050
},
5151
install_requires=[
5252
"pip>=22.3.1",
53-
"aws_cdk_lib==2.44.0",
53+
"aws_cdk_lib==2.75.0",
5454
"Click==8.1.3",
5555
"boto3==1.26.47",
5656
"requests==2.28.1",

source/cdk_solution_helper_py/requirements-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
aws_cdk_lib==2.44.0
2-
aws-cdk.aws-servicecatalogappregistry-alpha==2.44.0a0
1+
aws_cdk_lib==2.75.0
2+
aws-cdk.aws-servicecatalogappregistry-alpha==2.75.0a0
33
black
44
boto3==1.26.47
55
requests==2.28.1

source/infrastructure/cdk.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"context": {
44
"SOLUTION_NAME": "Maintaining Personalized Experiences with Machine Learning",
55
"SOLUTION_ID": "SO0170",
6-
"SOLUTION_VERSION": "v1.4.0",
6+
"SOLUTION_VERSION": "v1.4.1",
77
"APP_REGISTRY_NAME": "personalized-experiences-ML",
8-
"APPLICATION_TYPE": "AWS-Solutions"
8+
"APPLICATION_TYPE": "AWS-Solutions",
9+
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true
910
}
1011
}

0 commit comments

Comments
 (0)