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

inject faults for aws service api calls #6

Open
kapilt opened this issue Jul 23, 2019 · 2 comments
Open

inject faults for aws service api calls #6

kapilt opened this issue Jul 23, 2019 · 2 comments

Comments

@kapilt
Copy link

kapilt commented Jul 23, 2019

sketch of a config (faults, delays) and implementation
https://gist.github.com/kapilt/eb8f9b82473d7fa8295fbf1d10c11c11

ideally we should be able to control which services, rates, and delay ranges. errors are a little harder to configure, since error codes may need to match up to individual api calls, although there's a few generic ones.

@alexcasalboni
Copy link
Contributor

alexcasalboni commented Jul 23, 2019

Does the following make sense for decorator design & local config override?

import boto3
s3 = boto3.client('s3')
@inject_delay(boto=true, services=['s3', 'ssm'])
def lambda_handler_with_boto_delay(event, context):
    obj = s3.get_object(
        Bucket='blabla',
        Key='blabla',
    )
    return {
        'statusCode': 200,
        'body': obj.body.read(),
    }

@sriram9707
Copy link

@kapilt Hey Kapil, i get the below error wheni try to execute the script.

'Session' object has no attribute 'register'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants