When you use the aws-cli component from leverage cli (either to configure your credentials and use them with terraform or using aws-cli directly) on ARM architectures (Apple MacBook Pro M1) you get an error due to a dependency not found.
➜ repository git:(main) leverage credentials configure --type MANAGEMENT
[23:11:47.408] INFO Reading info from build.env
[23:11:47.557] INFO Loading configuration file.
[23:11:47.558] INFO Loading project environment configuration file.
[23:11:47.559] INFO Loading Terraform common configuration.
[23:11:48.041] INFO Configuring management credentials.
> Select the means by which you'll provide the programatic keys: Manually
> Key: XXXXXXXXXXXXXXXXXXXXXX
> Secret: ****************************************
[23:12:08.720] ERROR AWS CLI error: qemu-x86_64:
Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
Expected Behavior
It is expected to be able to configure the aws-cli credentials from the leverage cli and to be able to use aws-cli with the native aws-cli commands, on both x86 and ARM architectures
Go to the root folder of the cloned repository and try to configure the MANAGEMENT or SECURITY credentials.
leverage credentials configure --type MANAGEMENT
Select the Manually option to configure the credentials.
Indicates the Access Key and Secret Access Key values (previously obtained from the AWS console in the IAM section).
See error
Screenshots
Environment (please complete the following information):
OS: macOS Ventura 13.2.1 (22D68) - Kernel Version: Darwin 22.3.0
Workstation: MacBook Pro M1 Pro
Leverage cli version: 1.9.2
Python version: Python 3.10.5 | pip 23.0.1
Docker version:
Client:
Cloud integration: v1.0.31
Version: 20.10.23
API version: 1.41
Go version: go1.18.10
Git commit: 7155243
Built: Thu Jan 19 17:35:19 2023
OS/Arch: darwin/arm64
Context: desktop-linux
Experimental: true
## Additional Context
In a similar environment (with M1) @lgallard does not get the error
## Describe Ideal Solution
If you change the installer of aws-cli for the appropriate one for ARM (for example, in this [line](https://github.com/binbashar/le-docker-leverage-toolbox/blob/master/Dockerfile#L78)) the error is solved.
![image](https://user-images.githubusercontent.com/35702375/227317647-bb382957-52b2-4b9e-b7d0-933e593a5177.png)
However, that change would generate an error on non-ARM platforms.
It would be necessary to make a refactor in such a way that it can be parameterized and at the time of the build inject the target platform and install the corresponding versions of the different tools for those architectures.
While the erroneous behavior did not occur in other tools in the image, there are several similar references in the Dockerfile to x86 architectures that could be customized for ARM.
Describe the Bug
When you use the aws-cli component from leverage cli (either to configure your credentials and use them with terraform or using aws-cli directly) on ARM architectures (Apple MacBook Pro M1) you get an error due to a dependency not found.
Expected Behavior
It is expected to be able to configure the aws-cli credentials from the leverage cli and to be able to use aws-cli with the native aws-cli commands, on both x86 and ARM architectures
Steps to Reproduce
Steps to reproduce the behavior:
leverage credentials configure --type MANAGEMENT
Screenshots
Environment (please complete the following information):
macOS Ventura 13.2.1 (22D68) - Kernel Version: Darwin 22.3.0
MacBook Pro M1 Pro
1.9.2
Python 3.10.5 | pip 23.0.1
Server: Docker Desktop 4.17.0 (99724) Engine: Version: 20.10.23 API version: 1.41 (minimum version 1.12) Go version: go1.18.10 Git commit: 6051f14 Built: Thu Jan 19 17:31:28 2023 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.18 GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0