Skip to content

refactor(parameters): deprecate the config parameter in favor of boto_config - #4893

Merged
leandrodamascena merged 3 commits into
aws-powertools:v3from
leandrodamascena:boto-config
Aug 6, 2024
Merged

leandrodamascena merged 3 commits into
aws-powertools:v3from
leandrodamascena:boto-config

Conversation

@leandrodamascena

Copy link
Copy Markdown
Contributor

Issue number: #4729

Summary

Changes

This PR introduces a new parameter boto_config in the parameter features for dynamodb, ssm, secrets, and appconfig, while deprecating the existing config parameter. This change aims to improve clarity and specificity in our API without immediately breaking existing implementations. A warning will be raised if using config parameter.

User experience

BEFORE

from botocore.config import Config

from aws_lambda_powertools.utilities import parameters

boto_config = Config()
ssm_provider = parameters.SSMProvider(config=boto_config)


def handler(event, context):
    # Retrieve a single parameter
    value = ssm_provider.get("/my/parameter")

    return value

AFTER

from botocore.config import Config

from aws_lambda_powertools.utilities import parameters

boto_config = Config()
ssm_provider = parameters.SSMProvider(boto_config=boto_config)


def handler(event, context):
    # Retrieve a single parameter
    value = ssm_provider.get("/my/parameter")

    return value

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena
leandrodamascena requested a review from a team August 6, 2024 00:19
@boring-cyborg boring-cyborg Bot added documentation Improvements or additions to documentation tests labels Aug 6, 2024
@pull-request-size pull-request-size Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 6, 2024
@leandrodamascena
leandrodamascena requested a review from sthulb August 6, 2024 00:20
@github-actions github-actions Bot added enhancement and removed documentation Improvements or additions to documentation labels Aug 6, 2024
@leandrodamascena

Copy link
Copy Markdown
Contributor Author

Hey @sthulb! I need your review here please.

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2024

Copy link
Copy Markdown

@boring-cyborg boring-cyborg Bot added the documentation Improvements or additions to documentation label Aug 6, 2024
@github-actions github-actions Bot removed the documentation Improvements or additions to documentation label Aug 6, 2024
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2024

Copy link
Copy Markdown

@leandrodamascena leandrodamascena changed the title refactor(parameters): use boto_config instead of config parameter refactor(parameters): deprecate the config parameter in favor of boto_config Aug 6, 2024
@boring-cyborg boring-cyborg Bot added the documentation Improvements or additions to documentation label Aug 6, 2024
@github-actions github-actions Bot removed the documentation Improvements or additions to documentation label Aug 6, 2024
@leandrodamascena
leandrodamascena merged commit 08f2b53 into aws-powertools:v3 Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tech debt: Refactor parameters utility to use boto_config instead of config parameter

2 participants