Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
100 stars 28 forks source link

error when running aws cli as a runsh #5174

Closed tkumark closed 3 years ago

tkumark commented 3 years ago

When I run the below job I get the following error at step aws ssm send-command. Is aws ssm send-command supported?

SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this.

jobs:

  - name: nginx-runsh
    type: runSh
    steps: 
      - IN: splat-web-img-1
      - TASK:
        - script: pip install cryptography==2.2.2
        - script: aws --version
        - script: python --version
        - script: mkdir -p ~/.aws
        - script: AWS_PATH=~/.aws        
        - script: rm -f $AWS_PATH/config
        - script: rm -f $AWS_PATH/credentials
        - script: echo "[default]" >> $AWS_PATH/config
        - script: echo "region=us-east-1" >> $AWS_PATH/config
        - script: echo "output=json" >> $AWS_PATH/config 
        - script: echo "[default]" >> $AWS_PATH/credentials
        - script: echo "aws_access_key_id=$AWSINTEGRATION_INTEGRATION_ACCESSKEY" >> $AWS_PATH/credentials
        - script: echo "aws_secret_access_key=$AWSINTEGRATION_INTEGRATION_SECRETKEY" >> $AWS_PATH/credentials
        - script: ls
        - script: echo $SPLATNGINXIMG1_VERSIONNAME
        - script: aws ssm send-command --document-name "Deploy-doc" --document-version "3" --targets '[{"Key":"InstanceIds","Values":["i-23rsaefagf"]}]' --parameters '{"DockerImage":["45345343.dkr.ecr.us-east-1.amazonaws.com/splat-web:release-TI-937.1277"]}' --timeout-seconds 600 --max-concurrency "50" --max-errors "0" --region us-east-1
    flags:
      - splat-web-test
a-murphy commented 3 years ago

The aws ssm send-command command is available in the latest build images. The message is a warning related to the Python version. If the command is failing, it may be that a certificate isn't available but there isn't enough information here to be sure.

tkumark commented 3 years ago

How do I know I am using the latest build image?

a-murphy commented 3 years ago

The latest images have v7.2.4 tags, which you can see in the console logs when the build container is started. Directions to change the default image version used by a node pool are here.