-
Notifications
You must be signed in to change notification settings - Fork 23
fix: Update support for DeadLetterConfig
#134
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
fix: Update support for DeadLetterConfig
#134
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @Vandita2020 ! Left few comments in-line
@@ -604,6 +604,67 @@ def test_function_architecture(self, lambda_client): | |||
# Check Lambda function doesn't exist | |||
assert not lambda_validator.function_exists(resource_name) | |||
|
|||
def test_function_features(self, lambda_client): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing with this error message:
2024-04-01T22:47:58.673Z DEBUG ackrt << r.createResource {"kind": "Function", "namespace": "default", "name": "functionfeatures-6ihswvx", "account": "566350749442", "role": "", "region": "us-west-2", "is_adopted": false, "generation": 1, "error": "InvalidParameterValueException: The provided execution role does not have permissions to call SendMessage on SQS\n{\n RespMetadata: {\n StatusCode: 400,\n RequestID: \"ee5cd503-5f8a-4c66-a8e5-88473a1fb18a\"\n },\n Message_: \"The provided execution role does not have permissions to call SendMessage on SQS\",\n Type: \"User\"\n}"}
It looks like we need to add more permissions to Role we create during the bootstrap. Maybe we can introduce a new role for DLQ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing out the error, I have used another Role now. This role will give permission to access SQS.
runtime: python3.9 | ||
handler: main | ||
deadLetterConfig: | ||
targetARN: $TARGET_ARN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nit:
targetARN: $TARGET_ARN | |
targetARN: $DEAD_LETTER_CONFIG_TARGET_ARN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
f70289f
to
a3999d4
Compare
a3999d4
to
0d71257
Compare
0d71257
to
0e4be83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! Thank you @Vandita2020 !
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, Vandita2020 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description:
This PR adds the missing update feature for
DeadLetterConfig
property in Function resource.Acknowledgement:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.