-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lambda AnsibleAWSModule cleanup (also enable retries) (#5)
* Bomb out early if someone tries to set tags without the necessary botocore version * Simplify some error handling by using fail_json_aws * Use BotoCoreError rather than the sub-errors We still bomb out, but fail_json_aws is more graceful and user friendly than an uncaught Boto3 error. * use is_boto3_error_code to limit what we catch rather than catching and re-raising. * Cleanup get_account_info - use module.client to avoid the mass of extra args - use is_boto3_error_code('AccessDenied') to be a little cleaner - fix text search (re.search(, mystring) rather than mystring.search()) * Use module.client helpers * Delete dead code path - we test for having *both* vpc_subnet_ids and vpc_security_group_ids when we parse the arguments * Enable basic AWS Retries * Tweak integration test to allow for common 'missing region' error message * Rename lambda tests from 'aws_lambda' to 'lambda' (matching the module name) * Use omit rather than 'null' in the tests - ansible/ansible#69190 * Ignore duplicate-except warnings (it's caused by the way is_boto3_error works) * change expected error messages now we're using an AnsibleAWSModule feature
- Loading branch information
Showing
6 changed files
with
59 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/integration/targets/aws_lambda/aliases → tests/integration/targets/lambda/aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
cloud/aws | ||
shippable/aws/group2 | ||
execute_lambda | ||
lambda | ||
lambda_info |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters