Skip to content

Docs Update for clarify. #2484

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

Closed
wants to merge 2 commits into from
Closed

Conversation

ericglasser
Copy link

Summary

When going through the documentation I noticed on inconsistency, and one item that would lead to a failed build.

Changes

  • Changed the version of the lambda layer being used.
  • removed @aws-sdk from example since this requires adding the sdk layer or the function will fail.

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.

@ericglasser ericglasser requested a review from a team May 6, 2024 20:13
@ericglasser ericglasser requested a review from a team as a code owner May 6, 2024 20:13
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label May 6, 2024
Copy link

boring-cyborg bot commented May 6, 2024

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label May 6, 2024
Copy link

sonarqubecloud bot commented May 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

github-actions bot commented May 6, 2024

No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure.

@github-actions github-actions bot added do-not-merge This item should not be merged need-issue This PR needs an issue before it can be reviewed/worked on further labels May 6, 2024
@dreamorosi
Copy link
Contributor

Hi, thank you for opening this PR.

I have tried to reproduce the issue you described on my end but I was not able to.

I have deployed a simple function that accesses a SSM parameter and calls STS. These two calls show that the function is able to use the AWS SDK even though it's being excluded from the bundle. This is because the SDK clients needed by Powertools are bundled in the layer, while those who aren't bundled should be present in the execution environment as long as you are using Node.js 18 or greater.

I have created a minimal example in an attempt to observe the issue you described, which you can find here: https://github.com/dreamorosi/layertest-2484

The only combination that I can imagine giving issues with that exclusion is if you're using the Node.js 16 managed runtime and you are using another AWS SDK client that is not part of the one

In that case I would be more inclined to update the section with a callout about that runtime specifically, especially since we will stop supporting it in 2 months (#2223).

--

The layer ARN is however wrong, we'll investigate why it's not being updated and are happy to merge the change.

@dreamorosi
Copy link
Contributor

We have merged a change to the automation that updates the layer ARN in the docs (#2487), this should ensure that future releases update the layer ARN correctly.

@ericglasser
Copy link
Author

Hi, thank you for opening this PR.

I have tried to reproduce the issue you described on my end but I was not able to.

I have deployed a simple function that accesses a SSM parameter and calls STS. These two calls show that the function is able to use the AWS SDK even though it's being excluded from the bundle. This is because the SDK clients needed by Powertools are bundled in the layer, while those who aren't bundled should be present in the execution environment as long as you are using Node.js 18 or greater.

I have created a minimal example in an attempt to observe the issue you described, which you can find here: https://github.com/dreamorosi/layertest-2484

The only combination that I can imagine giving issues with that exclusion is if you're using the Node.js 16 managed runtime and you are using another AWS SDK client that is not part of the one

In that case I would be more inclined to update the section with a callout about that runtime specifically, especially since we will stop supporting it in 2 months (#2223).

--

The layer ARN is however wrong, we'll investigate why it's not being updated and are happy to merge the change.

Thank you for this clarification, I was intending to use node 18, so I thought this was still a bug, but looking back at the sample node 16 was being used which explains the discrepancy.

@ericglasser
Copy link
Author

Closing since both items were addressed.

@ericglasser ericglasser closed this May 7, 2024
@dreamorosi dreamorosi removed do-not-merge This item should not be merged need-issue This PR needs an issue before it can be reviewed/worked on further labels May 7, 2024
@dreamorosi
Copy link
Contributor

Either way, thank you so much for taking the time to open the PR and for using Powertools.

If you find any other are for improvement please don't hesitate to open an issue to discuss it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/XS PR between 0-9 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants