Skip to content

Replacing the default boto3 session with a custom one #704

Closed
@adhorn

Description

@adhorn

Is your feature request related to a problem? Please describe.

I would like to replace the default boto3 powertools client and provide my own boto3 session to record local calls using Placebo

Describe the solution you'd like

For example, here's how you could inject a Placebo client for local tests:

import placebo
import boto3
from aws_lambda_powertools.utilities import Parameters

session = boto3.Session()
pill = placebo.attach(session, data_path=PLACEBO_PATH)
pill.playback()
client = session.client('appconfig')
Parameters.set_boto3_client(client)

something like this...?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions