Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWS] Add support for Python 3.11, arm64 for RDS/VPC lambda #731

Merged
merged 3 commits into from
Jan 30, 2024
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: 7 additions & 5 deletions aws/logs_monitoring/cloudwatch_log_group_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ def get_log_group_tags(log_group):
formatted_tags = None
if response is not None:
formatted_tags = [
"{key}:{value}".format(
key=sanitize_aws_tag_string(k, remove_colons=True),
value=sanitize_aws_tag_string(v, remove_leading_digits=False),
(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive by to fix a linting issue

"{key}:{value}".format(
key=sanitize_aws_tag_string(k, remove_colons=True),
value=sanitize_aws_tag_string(v, remove_leading_digits=False),
)
if v
else sanitize_aws_tag_string(k, remove_colons=True)
)
if v
else sanitize_aws_tag_string(k, remove_colons=True)
for k, v in response["tags"].items()
]
return formatted_tags
Expand Down
2 changes: 1 addition & 1 deletion aws/rds_enhanced_monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ d. **Not Recommended**: Plaintext

- Create a `lambda_execution` role and attach this policy.

- Create a lambda function: skip the blueprint, name it `functionname`, set the runtime to `Python 3.10`, the handle to `lambda_function.lambda_handler`, and the role to `lambda_execution`.
- Create a lambda function: skip the blueprint, name it `functionname`, set the Runtime to `Python 3.11`, the Architecture to `arm64`, the handle to `lambda_function.lambda_handler`, and the role to `lambda_execution`.

- Copy the content of `functionname/lambda_function.py` in the code section

Expand Down
4 changes: 3 additions & 1 deletion aws/rds_enhanced_monitoring/rds-enhanced-sam-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Resources:
Policies:
KMSDecryptPolicy:
KeyId: !Ref KMSKeyId
Runtime: python3.10
Architectures:
- arm64
Runtime: python3.11
Timeout: 10
KmsKeyArn:
!Sub
Expand Down
2 changes: 1 addition & 1 deletion aws/vpc_flow_log_monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ version, account, eni, source, destination, srcport, destport="22", protocol="6"

- Create a `lambda_execution` role and attach this policy

- Create a lambda function: Skip the blueprint, name it `functionname`, set the Runtime to `Python 3.10`, the handle to `lambda_function.lambda_handler`, and the role to `lambda_execution`.
- Create a lambda function: Skip the blueprint, name it `functionname`, set the Runtime to `Python 3.11`, the Architecture to `arm64`,, the handle to `lambda_function.lambda_handler`, and the role to `lambda_execution`.

- Copy the content of `functionname/lambda_function.py` in the code section, make sure to update the `KMS_ENCRYPTED_KEYS` environment variable with the encrypted key generated in step 1

Expand Down
4 changes: 3 additions & 1 deletion aws/vpc_flow_log_monitoring/vpc-flow-log-sam-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Resources:
Policies:
KMSDecryptPolicy:
KeyId: !Ref KMSKeyId
Runtime: python3.10
Runtime: python3.11
Architectures:
- arm64
Timeout: 10
KmsKeyArn:
!Sub
Expand Down
Loading