Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
astroid~=2.5.6
botocore==1.20.74
boto3==1.17.74
isort==5.8.0
astroid~=2.6.4
botocore==1.21.2
boto3==1.18.2
isort==5.9.2
mock~=4.0.3
pylint~=2.8.2
pylint~=2.9.3
pytest~=6.2.4
pyyaml>=5.4.1
schema~=0.7.4
tox==3.23.1
tox==3.24.0
18 changes: 14 additions & 4 deletions src/lambda_codebase/account/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@
try:
from main import lambda_handler # pylint: disable=unused-import
except Exception as err: # pylint: disable=broad-except
import os
import logging
from urllib.request import Request, urlopen
import json

LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(os.environ.get("ADF_LOG_LEVEL", logging.INFO))

def lambda_handler(event, _context, prior_error=err):
response = dict(
payload = dict(
LogicalResourceId=event["LogicalResourceId"],
PhysicalResourceId=event.get(
"PhysicalResourceId",
Expand All @@ -22,11 +27,16 @@ def lambda_handler(event, _context, prior_error=err):
StackId=event["StackId"],
Reason=str(prior_error),
)
urlopen(
with urlopen(
Request(
event["ResponseURL"],
data=json.dumps(response).encode(),
data=json.dumps(payload).encode(),
headers={"content-type": ""},
method="PUT",
)
)
) as response:
response_body = response.read().decode("utf-8")
LOGGER.debug(
"Response: %s",
response_body,
)
18 changes: 14 additions & 4 deletions src/lambda_codebase/cross_region_bucket/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,33 @@
try:
from main import lambda_handler # pylint: disable=unused-import
except Exception as err: # pylint: disable=broad-except
import os
import logging
from urllib.request import Request, urlopen
import json

LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(os.environ.get("ADF_LOG_LEVEL", logging.INFO))

def lambda_handler(event, _context, prior_error=err):
response = dict(
payload = dict(
LogicalResourceId=event["LogicalResourceId"],
PhysicalResourceId=event.get("PhysicalResourceId", "NOT_YET_CREATED"),
Status="FAILED",
RequestId=event["RequestId"],
StackId=event["StackId"],
Reason=str(prior_error),
)
urlopen(
with urlopen(
Request(
event["ResponseURL"],
data=json.dumps(response).encode(),
data=json.dumps(payload).encode(),
headers={"content-type": ""},
method="PUT",
)
)
) as response:
response_body = response.read().decode("utf-8")
LOGGER.debug(
"Response: %s",
response_body,
)
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ Resources:
nodejs: 12
pre_build:
commands:
- npm install cdk@1.105 -g -y --quiet --no-progress
- npm install cdk@1.114 -g -y --quiet --no-progress
- aws s3 cp s3://$SHARED_MODULES_BUCKET/adf-build/ ./adf-build/ --recursive --quiet
- pip install -r adf-build/requirements.txt -q -t ./adf-build
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,33 @@
try:
from initial_commit import lambda_handler # pylint: disable=unused-import
except Exception as err: # pylint: disable=broad-except
import os
import logging
from urllib.request import Request, urlopen
import json

LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(os.environ.get("ADF_LOG_LEVEL", logging.INFO))

def lambda_handler(event, _context, prior_error=err):
response = dict(
payload = dict(
LogicalResourceId=event["LogicalResourceId"],
PhysicalResourceId=event.get("PhysicalResourceId", "NOT_YET_CREATED"),
Status="FAILED",
RequestId=event["RequestId"],
StackId=event["StackId"],
Reason=str(prior_error),
)
urlopen(
with urlopen(
Request(
event["ResponseURL"],
data=json.dumps(response).encode(),
data=json.dumps(payload).encode(),
headers={"content-type": ""},
method="PUT",
)
)
) as response:
response_body = response.read().decode("utf-8")
LOGGER.debug(
"Response: %s",
response_body,
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Jinja2~=2.11.3
boto3==1.17.74
Jinja2~=3.0.1
boto3==1.18.2
cfn-custom-resource~=1.0.1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Install libs here that you might want in AWS CodeBuild (On Master Account)
astroid~=2.5.6
aws-sam-cli==1.23.0
awscli==1.19.74
boto3==1.17.74
botocore==1.20.74
astroid~=2.6.4
aws-sam-cli==1.26.0
awscli==1.20.2
boto3==1.18.2
botocore==1.21.2
mock~=4.0.3
pip~=21.1.1
pylint~=2.8.2
pip~=21.1.3
pylint~=2.9.3
pytest~=6.2.4
pyyaml>=5.4.1
six~=1.16.0
tenacity==6.3.0
urllib3~=1.25.11
tenacity==6.3.1
urllib3~=1.26.6
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
botocore==1.20.74
boto3==1.17.74
botocore==1.21.2
boto3==1.18.2
docopt~=0.6.2
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
# Install libs here that you might want in AWS CodeBuild
aws-cdk-assets==1.105
aws-cdk.aws-apigateway==1.105
aws-cdk.aws-applicationautoscaling==1.105
aws-cdk.aws-autoscaling==1.105
aws-cdk.aws-autoscaling_common==1.105
aws-cdk.aws-autoscaling_hooktargets==1.105
aws-cdk.aws-certificatemanager==1.105
aws-cdk.aws-cloudformation==1.105
aws-cdk.aws-cloudfront==1.105
aws-cdk.aws-cloudwatch==1.105
aws-cdk.aws-codebuild==1.105
aws-cdk.aws-codecommit==1.105
aws-cdk.aws-codedeploy==1.105
aws-cdk.aws-codepipeline-actions==1.105
aws-cdk.aws-codepipeline==1.105
aws-cdk.aws-dynamodb==1.105
aws-cdk.aws-ec2==1.105
aws-cdk.aws-ecr==1.105
aws-cdk.aws-ecr==1.105
aws-cdk.aws-ecr_assets==1.105
aws-cdk.aws-ecs==1.105
aws-cdk.aws-elasticloadbalancing==1.105
aws-cdk.aws-elasticloadbalancingv2==1.105
aws-cdk.aws-events==1.105
aws-cdk.aws-events_targets==1.105
aws-cdk.aws-iam==1.105
aws-cdk.aws-kinesis==1.105
aws-cdk.aws-kms==1.105
aws-cdk.aws-lambda==1.105
aws-cdk.aws-lambda_event_sources==1.105
aws-cdk.aws-logs==1.105
aws-cdk.aws-route53==1.105
aws-cdk.aws-route53_targets==1.105
aws-cdk.aws-s3==1.105
aws-cdk.aws-s3_assets==1.105
aws-cdk.aws-s3_assets==1.105
aws-cdk.aws-s3_notifications==1.105
aws-cdk.aws-sam==1.105
aws-cdk.aws-secretsmanager==1.105
aws-cdk.aws-servicediscovery==1.105
aws-cdk.aws-sns==1.105
aws-cdk.aws-sns==1.105
aws-cdk.aws-sns_subscriptions==1.105
aws-cdk.aws-sqs==1.105
aws-cdk.aws-ssm==1.105
aws-cdk.aws-stepfunctions==1.105
aws-cdk.core==1.105
aws-cdk.cx-api==1.105
aws-cdk.region-info==1.105
awscli==1.19.74
aws-sam-cli==1.23.0
botocore==1.20.74
boto3==1.17.74
aws-cdk-assets==1.114
aws-cdk.aws-apigateway==1.114
aws-cdk.aws-applicationautoscaling==1.114
aws-cdk.aws-autoscaling==1.114
aws-cdk.aws-autoscaling_common==1.114
aws-cdk.aws-autoscaling_hooktargets==1.114
aws-cdk.aws-certificatemanager==1.114
aws-cdk.aws-cloudformation==1.114
aws-cdk.aws-cloudfront==1.114
aws-cdk.aws-cloudwatch==1.114
aws-cdk.aws-codebuild==1.114
aws-cdk.aws-codecommit==1.114
aws-cdk.aws-codedeploy==1.114
aws-cdk.aws-codepipeline-actions==1.114
aws-cdk.aws-codepipeline==1.114
aws-cdk.aws-dynamodb==1.114
aws-cdk.aws-ec2==1.114
aws-cdk.aws-ecr==1.114
aws-cdk.aws-ecr==1.114
aws-cdk.aws-ecr_assets==1.114
aws-cdk.aws-ecs==1.114
aws-cdk.aws-elasticloadbalancing==1.114
aws-cdk.aws-elasticloadbalancingv2==1.114
aws-cdk.aws-events==1.114
aws-cdk.aws-events_targets==1.114
aws-cdk.aws-iam==1.114
aws-cdk.aws-kinesis==1.114
aws-cdk.aws-kms==1.114
aws-cdk.aws-lambda==1.114
aws-cdk.aws-lambda_event_sources==1.114
aws-cdk.aws-logs==1.114
aws-cdk.aws-route53==1.114
aws-cdk.aws-route53_targets==1.114
aws-cdk.aws-s3==1.114
aws-cdk.aws-s3_assets==1.114
aws-cdk.aws-s3_assets==1.114
aws-cdk.aws-s3_notifications==1.114
aws-cdk.aws-sam==1.114
aws-cdk.aws-secretsmanager==1.114
aws-cdk.aws-servicediscovery==1.114
aws-cdk.aws-sns==1.114
aws-cdk.aws-sns==1.114
aws-cdk.aws-sns_subscriptions==1.114
aws-cdk.aws-sqs==1.114
aws-cdk.aws-ssm==1.114
aws-cdk.aws-stepfunctions==1.114
aws-cdk.core==1.114
aws-cdk.cx-api==1.114
aws-cdk.region-info==1.114
awscli==1.20.2
aws-sam-cli==1.26.0
botocore==1.21.2
boto3==1.18.2
mock~=4.0.3
pytest~=6.2.4
pyyaml>=5.4.1
schema~=0.7.4
urllib3~=1.25.11
urllib3~=1.26.6
18 changes: 14 additions & 4 deletions src/lambda_codebase/initial_commit/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,33 @@
try:
from initial_commit import lambda_handler # pylint: disable=unused-import
except Exception as err: # pylint: disable=broad-except
import os
import logging
from urllib.request import Request, urlopen
import json

LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(os.environ.get("ADF_LOG_LEVEL", logging.INFO))

def lambda_handler(event, _context, prior_error=err):
response = dict(
payload = dict(
LogicalResourceId=event["LogicalResourceId"],
PhysicalResourceId=event.get("PhysicalResourceId", "NOT_YET_CREATED"),
Status="FAILED",
RequestId=event["RequestId"],
StackId=event["StackId"],
Reason=str(prior_error),
)
urlopen(
with urlopen(
Request(
event["ResponseURL"],
data=json.dumps(response).encode(),
data=json.dumps(payload).encode(),
headers={"content-type": ""},
method="PUT",
)
)
) as response:
response_body = response.read().decode("utf-8")
LOGGER.debug(
"Response: %s",
response_body,
)
4 changes: 2 additions & 2 deletions src/lambda_codebase/initial_commit/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Jinja2~=2.11.3
boto3==1.17.74
Jinja2~=3.0.1
boto3==1.18.2
cfn-custom-resource~=1.0.1
18 changes: 14 additions & 4 deletions src/lambda_codebase/organization/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,33 @@
try:
from main import lambda_handler # pylint: disable=unused-import
except Exception as err: # pylint: disable=broad-except
import os
import logging
from urllib.request import Request, urlopen
import json

LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(os.environ.get("ADF_LOG_LEVEL", logging.INFO))

def lambda_handler(event, _context, prior_error=err):
response = dict(
payload = dict(
LogicalResourceId=event["LogicalResourceId"],
PhysicalResourceId=event.get("PhysicalResourceId", "NOT_YET_CREATED"),
Status="FAILED",
RequestId=event["RequestId"],
StackId=event["StackId"],
Reason=str(prior_error),
)
urlopen(
with urlopen(
Request(
event["ResponseURL"],
data=json.dumps(response).encode(),
data=json.dumps(payload).encode(),
headers={"content-type": ""},
method="PUT",
)
)
) as response:
response_body = response.read().decode("utf-8")
LOGGER.debug(
"Response: %s",
response_body,
)
Loading