Skip to content

feat: migrate to AWS SDK for Go v2 #232

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 1 commit into from
Jul 18, 2022
Merged

Conversation

kruskall
Copy link
Member

@kruskall kruskall commented Jul 14, 2022

AWS released the SDK for Go v2: https://github.com/aws/aws-sdk-go-v2

For a list of features and major improvements, see
https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-general-availability/

The new config loading code will take care of loading values from
default sources, including enrivonment variables (see
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config#LoadDefaultConfig).

Modularization is another big improvements that reduces the lambda
extension binary size:

Before: 13M
After: 10M

The secretmanager code was tested by providing a ELASTIC_APM_SECRET_TOKEN using ELASTIC_APM_SECRETS_MANAGER_SECRET_TOKEN_ID and the AWS secret manager (see https://www.elastic.co/guide/en/apm/guide/master/aws-lambda-secrets-manager.html)

AWS also published a migration guide for the SDK for Go v1: https://aws.github.io/aws-sdk-go-v2/docs/migrating/

AWS released the SDK for Go v2: https://github.com/aws/aws-sdk-go-v2

For a list of features and major improvements, see
https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-general-availability/

The new config loading code will take care of loading values from
default sources, including enrivonment variables (see
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config#LoadDefaultConfig).

Modularization is another big improvements that reduces the lambda
extension binary size:

Before: 13M
After: 10M
@github-actions github-actions bot added the aws-λ-extension AWS Lambda Extension label Jul 14, 2022
@apmmachine
Copy link

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-14T13:47:42.311+0000

  • Duration: 10 min 49 sec

Test stats 🧪

Test Results
Failed 0
Passed 220
Skipped 4
Total 224

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@AlexanderWert
Copy link
Member

AlexanderWert commented Jul 14, 2022

@kruskall Thanks for bringing this up.

Actually this replacement should live in the Node.js repo and it's already there:
https://github.com/raw/elastic/apm-agent-nodejs/main/docs/lambda/nodejs-arn-replacement.asciidoc

When looking at the non-released version of the docs (https://www.elastic.co/guide/en/apm/agent/nodejs/master/lambda.html) it's displayed properly.

Also, it's displayed properly for Java: https://www.elastic.co/guide/en/apm/agent/java/current/aws-lambda.html

So potentially it's due to some issues with back-porting / dependencies in the docs?
@bmorelli25 Do you have an idea why it is not resolving for Node.js on current documentation?

@kruskall
Copy link
Member Author

Hey @AlexanderWert 👋 ,

I think you commented on the wrong PR, was this meant for #231?

@AlexanderWert
Copy link
Member

@kruskall Ou, sorry, seems I typed in the wrong tab :-D

Copy link
Contributor

@simitt simitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kruskall kruskall merged commit 5f3bada into elastic:main Jul 18, 2022
@kruskall kruskall deleted the feat/aws-sdk-v2 branch July 18, 2022 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-λ-extension AWS Lambda Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants