Created
January 27, 2018 13:26
-
-
Save Muneefm/be63deff14f4093c3ef0d9145d2d0104 to your computer and use it in GitHub Desktop.
This is Gitlab-ci to update lambda code via gitlab. Used this to publish alexa skill.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- deploy | |
variables: | |
AWS_ACCESS_KEY_ID: "ABCD" | |
AWS_SECRET_ACCESS_KEY: "ABCD" | |
AWS_DEFAULT_REGION: "us-east-1" | |
NAME: "your-function-name" | |
RUNTIME: "nodejs6.10" | |
ROLE: "arn:aws:iam::000000000000:role/xxxxx" | |
HANDLER: "index.handler" | |
FILE: "fileb://your-file.zip" | |
S3_PATH: "upload-path-to-s3-bucket-" | |
S3_BUCKET: "s3-bucket-name" | |
S3_KEY: "file-path-in-s3-bucket" | |
upload-to-lambda: | |
image: salte/aws-lambda-deploy:latest | |
stage: deploy | |
script: | |
- zip -r your-file.zip . | |
- aws s3 ls | |
- aws s3 cp your-file.zip $S3_PATH | |
- aws lambda update-function-code --function-name $NAME --s3-bucket $S3_BUCKET --s3-key $S3_KEY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment