Describe the feature
Currently, amaysim/serverless only support aws cli v1, it would be great to have aws cli v1 supported.
The AWS CLI v2 offers several new features including improved installers, new configuration options such as AWS Single Sign-On (SSO), and various interactive features. More importantly, with serverless/serverless#9290, serverless framework still does not support use the ec2 role, so we have to use assume role scripts to make use of underlying ec2 profile inside serverless container, e.g.
role_arn='arn:aws:iam::account_id:role/ec2-role'
role_session_name='ec2-test'
profile_name='ec2-test'
temp_role=$(aws sts assume-role \
--role-arn $role_arn \
--role-session-name $role_session_name)
export AWS_ACCESS_KEY_ID=$(echo $temp_role | jq -r .Credentials.AccessKeyId)
export AWS_SECRET_ACCESS_KEY=$(echo $temp_role | jq -r .Credentials.SecretAccessKey)
export AWS_SESSION_TOKEN=$(echo $temp_role | jq -r .Credentials.SessionToken)
The above scripts can be replaced by https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/export-credentials.html with AWS cli version 2.
Additional context
Install aws cli v2 may need some effort to in Alpine as per aws/aws-cli#4685, it is possible as per https://docs.aws.amazon.com/cli/latest/userguide/getting-started-source-install.html - Alpine Linux container
Describe the feature
Currently, amaysim/serverless only support aws cli v1, it would be great to have aws cli v1 supported.
The AWS CLI v2 offers several new features including improved installers, new configuration options such as AWS Single Sign-On (SSO), and various interactive features. More importantly, with serverless/serverless#9290, serverless framework still does not support use the ec2 role, so we have to use assume role scripts to make use of underlying ec2 profile inside serverless container, e.g.
The above scripts can be replaced by https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/export-credentials.html with AWS cli version 2.
Additional context
Install aws cli v2 may need some effort to in Alpine as per aws/aws-cli#4685, it is possible as per https://docs.aws.amazon.com/cli/latest/userguide/getting-started-source-install.html - Alpine Linux container