Skip to content
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

[Bug]: Account creation is broken since the release of lambda runtime 3.9v51 #728

Closed
1 of 2 tasks
igordust opened this issue May 16, 2024 · 2 comments
Closed
1 of 2 tasks
Assignees
Labels
bug Something isn't working
Milestone

Comments

@igordust
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm observing today that the usual account creation procedure is broken. I observed it in three different ADF installations so I'm pretty sure that the impact is quite wide. Looking at the last successful execution, I notice that the lambda runtime has been updated, it was 3.9v46, now it's 3.9v51.

Expected Behavior

AccountFileProcess should run without errors and account creation should be performed

Current Behavior

Once submitted a new account configuration file, after the bootstrap pipeline has completed successfully, AccountFileProcessorFunction throws this exception:

[ERROR] Runtime.ImportModuleError: Unable to import module 'process_account_files': cannot import name 'DEPRECATED_SERVICE_NAMES' from 'botocore.docs' (/var/task/botocore/docs/__init__.py)
Traceback (most recent call last):

Steps To Reproduce

  1. create a new account configuration file in adf-accounts in the bootstrap repository
  2. commit it
  3. wait for bootstrap pipeline to complete
  4. go to AccountFileProcessorFunction lambda function and check the error

Possible Solution

The error is caused by a pretty old botocore version (1.29.54) packaged with the lambda, that is incompatible with the boto3 version now available in the runtime, that is 1.34.42.
The botocore version is not in the requirements, is a dependency of aws-xray-sdk, so the botocore version you find depends on the moment you installed ADF.

My suggestion is to fix both boto3 and botocore version explicitly in the requirements.
I would also suggest to check everywhere else there might such a similar issue.

Additional Information/Context

No response

ADF Version

3.2.0

Contributing a fix?

  • Yes, I am working on a fix to resolve this issue
@igordust igordust added the bug Something isn't working label May 16, 2024
@sbkok
Copy link
Collaborator

sbkok commented May 16, 2024

Thanks for opening this issue, I'm working on a fix at the moment to address this.

@sbkok sbkok self-assigned this May 16, 2024
@sbkok sbkok added this to the v3.2.1 milestone May 16, 2024
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue May 17, 2024
**Why?**

Issue: awslabs#728

With the latest Python runtime update provided by AWS Lambda, the boto3
dependencies were upgraded. However, with the account management Lambda
functions, the `aws-xray-sdk` requires botocore v1.29.54. This version
is incompatible with the latest boto3 package that was added to the Lambda
function runtime. Hence, it returned an error as described in 728.

**What?**

To ensure compatible versions are installed, ADF's lambda functions should
set the specific version of boto3 in its requirements.txt file if they rely on
that.
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue May 23, 2024
**Why?**

Issue: awslabs#728

With the latest Python runtime update provided by AWS Lambda, the boto3
dependencies were upgraded. However, with the account management Lambda
functions, the `aws-xray-sdk` requires botocore v1.29.54. This version
is incompatible with the latest boto3 package that was added to the Lambda
function runtime. Hence, it returned an error as described in 728.

**What?**

To ensure compatible versions are installed, ADF's lambda functions should
set the specific version of boto3 in its requirements.txt file if they rely on
that.
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue May 24, 2024
**Why?**

Issue: awslabs#728

With the latest Python runtime update provided by AWS Lambda, the boto3
dependencies were upgraded. However, with the account management Lambda
functions, the `aws-xray-sdk` requires botocore v1.29.54. This version
is incompatible with the latest boto3 package that was added to the Lambda
function runtime. Hence, it returned an error as described in 728.

**What?**

To ensure compatible versions are installed, ADF's lambda functions should
set the specific version of boto3 in its requirements.txt file if they rely on
that.
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue May 24, 2024
**Why?**

Issue: awslabs#728

With the latest Python runtime update provided by AWS Lambda, the boto3
dependencies were upgraded. However, with the account management Lambda
functions, the `aws-xray-sdk` requires botocore v1.29.54. This version
is incompatible with the latest boto3 package that was added to the Lambda
function runtime. Hence, it returned an error as described in 728.

**What?**

To ensure compatible versions are installed, ADF's lambda functions should
set the specific version of boto3 in its requirements.txt file if they rely on
that.
sbkok added a commit that referenced this issue May 27, 2024
**Why?**

Issue: #728

With the latest Python runtime update provided by AWS Lambda, the boto3
dependencies were upgraded. However, with the account management Lambda
functions, the `aws-xray-sdk` requires botocore v1.29.54. This version
is incompatible with the latest boto3 package that was added to the Lambda
function runtime. Hence, it returned an error as described in 728.

**What?**

To ensure compatible versions are installed, ADF's lambda functions should
set the specific version of boto3 in its requirements.txt file if they rely on
that.
@sbkok
Copy link
Collaborator

sbkok commented May 27, 2024

Thank you for your patience. I am happy to inform you that this issue has been resolved in our latest release v3.2.1 just now.
I'm hereby closing this issue. Please open a new issue if you are experiencing any issues with the latest release.

@sbkok sbkok closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants