Skip to content

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

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

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

leandrodamascena
Copy link
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
Contributor Author

Hey @sthulb! I need your review here please.

Copy link

sonarqubecloud bot commented 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
Copy link

sonarqubecloud bot commented Aug 6, 2024

@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
14 of 15 checks passed
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