Skip to content

Commit 6d79d9d

Browse files
authored
feature: add security tests and cdk tests, rename cookbook to service (#288)
* feature: added cfn nag and infra tests * chore: remove the word cookbook from code * make pr
1 parent 2923f64 commit 6d79d9d

31 files changed

+244
-194
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ deploy:
4747
make deps
4848
mkdir -p .build/lambdas ; cp -r service .build/lambdas
4949
mkdir -p .build/common_layer ; pipenv requirements > .build/common_layer/requirements.txt
50-
cdk deploy --app="python3 ${PWD}/cdk/aws_lambda_handler_cookbook/app.py" -require-approval=True
50+
cdk deploy --app="python3 ${PWD}/cdk/my_service/app.py" -require-approval=True
5151

5252
destroy:
53-
cdk destroy --app="python3 ${PWD}/cdk/aws_lambda_handler_cookbook/app.py" -require-approval=True
53+
cdk destroy --app="python3 ${PWD}/cdk/my_service/app.py" -require-approval=True
5454

5555
docs:
5656
mkdocs serve

Pipfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ verify_ssl = true
44
name = "pypi"
55

66
[dev-packages]
7-
cookbook-cdk = {editable = true,path = "cdk"}
7+
service-cdk = {editable = true,path = "cdk"}
88
pytest = "*"
99
pytest-mock = "*"
1010
pycodestyle = "*"
@@ -22,7 +22,6 @@ isort = "*"
2222
boto3 = "*"
2323
mkdocs-material = "*"
2424
mkdocs-git-revision-date-plugin = "*"
25-
cattrs = "==1.10.0"
2625

2726
[packages]
2827
pydantic = {extras = ["email"],version = "*"}

Pipfile.lock

Lines changed: 129 additions & 114 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cdk/aws_lambda_handler_cookbook/app.py renamed to cdk/my_service/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
from aws_cdk import App, Environment
55
from boto3 import client, session
66
from service_stack.constants import get_stack_name
7-
from service_stack.cookbook_stack import CookBookStack
7+
from service_stack.service_stack import ServiceStack
88

99
# pylint: disable=invalid-name
1010
account = client('sts').get_caller_identity()['Account']
1111
region = session.Session().region_name
1212
app = App()
13-
my_stack = CookBookStack(app, get_stack_name(),
14-
env=Environment(account=os.environ.get('AWS_DEFAULT_ACCOUNT', account), region=os.environ.get('AWS_DEFAULT_REGION', region)))
13+
my_stack = ServiceStack(app, get_stack_name(),
14+
env=Environment(account=os.environ.get('AWS_DEFAULT_ACCOUNT', account), region=os.environ.get('AWS_DEFAULT_REGION', region)))
1515

1616
app.synth()
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from typing import Any, Dict, Optional
44

55
import aws_cdk.aws_appconfig as appconfig
6-
from aws_lambda_handler_cookbook.service_stack.configuration.schema import FeatureFlagsConfiguration
76
from constructs import Construct
7+
from my_service.service_stack.configuration.schema import FeatureFlagsConfiguration
88

99
DEFAULT_DEPLOYMENT_STRATEGY = 'AppConfig.AllAtOnce'
1010

0 commit comments

Comments
 (0)