gkrizek / bash-lambda-layer

Run Bash scripts in AWS Lambda via Layers
MIT License
428 stars 89 forks source link

awscli updated from 1.16.181 to 1.18.9 #58

Closed mashiike closed 4 years ago

mashiike commented 4 years ago

This Pull Request does update AWS CLI to 1.18.9

Follow the steps below to update:

  1. Execute the following command using the docker image of amazonlinux:2 with python3 installed.

    $ docker run -it -v ${PWD}/opt:/opt -e PYTHONUSERBASE=/opt python3-amazonlinux2 pip3 install --user awscli
  2. Replace the following using the site-packages obtained in step 1.

    • bin/aws
    • bin/awscli
    • bin/botocore
    • bin/colorama
    • bin/dateutil
    • bin/docutils
    • bin/pyasn1
    • bin/s3transfer
    • bin/yaml
    • bin/jmespath
    • bin/rsa
    • bin/urllib3
    • bin/six.py
  3. check update. create lambda function with bash layer . index.sh is

    function handler {
        set -e
    
        AWSCLI_VER=$(aws --version)
        echo "{\"success\": true, \"awscliVersion\": \"${AWSCLI_VER}\"}" >&2
    }

before updated:

    {"success": true, "awscliVersion": "aws-cli/1.16.181 Python/3.6.8 Linux/4.14.138-99.102.amzn2.x86_64 botocore/1.12.171"}

after updated:

    {"success": true, "awscliVersion": "aws-cli/1.18.9 Python/3.6.8 Linux/4.14.138-99.102.amzn2.x86_64 botocore/1.15.9"}
mashiike commented 4 years ago

I missed the disclaimer in "Adding New Executables" section of README.md. Create an issue. #61