How to add aws-cli v2 in production?

Solution for How to add aws-cli v2 in production?
is Given Below:

I have developed an application in nodejs/vuejs and I want to dockerize the whole project before push it in production.

Knowing that my API is executing an aws command at a specific time, I need to install and configure AWS-CLIv2 in production.

crontab.scheduleJob('30 8,12 * * *', () => {  
  shelljs.exec("rm -rf src/data/*.csv && aws s3 cp s3://${bucketName}/`aws s3 ls s3://${bucketName} | tail -n 1 | awk '{print $4}'` src/data");

For development, I installed (from line command) and configured AWS locally from

Would it be possible to install aws-cliv2 via the API’s Dockerfile? What structure should I adopt?

Otherwise offer me your solutions please ?

Thank you

Maybe you can try use the SDK of AWS for interact with the AWS API (in this case the S3 Bucket), but if you prefer use the aws-cli binary you can install the binary like this docker image is made it or make your docker image based in this image.