Skip to content

Packages installed in the layer are different that the ones from aws_lambda_powertools[all] #1807

Closed Answered by heitorlessa
ericbn asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @ericbn, thanks for another great question ;)

TL;DR: This is because we remove what's already available in Lambda when building the Layer, whereas locally you'll be bringing that as a peer dependency because of AWS X-Ray SDK.

Answering the questions now:

Shouldn't the package versions all be the same between the layer and the aws_lambda_powertools extra(s)?

Not in the context you ran with pkg_resources, because (A) it brings additional libraries like awslambdaric only available at runtime, (B) we're setting a minimum boto3 version to match with what's available at Lambda runtime at the time of writing (quite old), (C) and X-Ray SDK depends on boto3 1.11.3 or higher so pip/poetry/hat…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ericbn
Comment options

@rubenfonseca
Comment options

@heitorlessa
Comment options

@heitorlessa
Comment options

@ericbn
Comment options

Answer selected by ericbn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants