amaysim-au / docker-serverless Goto Github PK
View Code? Open in Web Editor NEWDocker image containing NodeJS, Serverless Framework and Yarn.
License: MIT License
Docker image containing NodeJS, Serverless Framework and Yarn.
License: MIT License
So I don't have to explicitly specify version when doing a docker run
https://github.com/amaysim-au/docker-serverless/actions/workflows/deploy.yml
This scheduled workflow is disabled because there hasn't been activity in this repository for at least 60 days.
Serverless 2.53.X
is out, but the latest docker image available is 2.44.0
from 2 months ago.
sls --version
Framework Core: 2.53.1
Plugin: 5.4.3
SDK: 4.2.6
Components: 3.14.2
Please manually re-execute the actions, or make some change so the action runs?
Thanks for the image! This is very helpful.
The serverless.yml
in the example/apigw
contains a reference to an unsupported version of Node.js. This prevents the example from deploying successfully.
This should be updated to the latest supported version of Node.js for the Lambda Runtime as specified here: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
service: amaysim-apigw-example
package:
artifact: package/package.zip
provider:
name: aws
runtime: nodejs6.10
region: ${env:AWS_REGION}
stage: ${env:ENV}
Node Docker moved from Alpine 3.11
to 3.14
(for node:lts-alpine
) and the later does not support add python
. So the change is to use package python2
instead.
The commit is 7dc4bfc. I was meant to create a PR.
The commit above also makes sure the latest version of node:lts-alpine
is downloaded.
3.38 of the Serverless Framework is available
https://github.com/serverless/serverless/releases/tag/v3.38.0
The latest image version available from this repo is 3.36.
Please can the deploy pipeline run again to create the latest version.
https://github.com/amaysim-au/docker-serverless/actions/workflows/deploy.yml
Thank you
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
The Deploy Workflow is currently disabled because there hasn't been activity in this repository for at least 60 days.
Please see: https://github.com/amaysim-au/docker-serverless/actions/workflows/deploy.yml
At the moment the version is hard coded in two locations:
Propose to move the version injection in the Dockerfile to come from a build argument, with the default being no @
specific version (that is, a docker build .
will default to the most recent serverless version).
Please update to the latest version of Serverless - 1.30.0 at the time of writing: https://github.com/serverless/serverless/releases/tag/v1.30.0
Hi guys,
Thanks for your work on this image. I am currently using the docker image to build the pipeline on Jenkins. I got a strange error when it executes the sls deploy
. I just wonder anyone has ever saw this before. Here is the error message:
I am quite wondering the way to solve this issue. Appreciated to help of any kinds. Thanks.
edit:
Sorry for open this issue, please just ignore it. just a simple typo on my side
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.