SAM added

This commit is contained in:
ogutperl
2018-01-05 15:57:32 +01:00
parent 3269258ece
commit ec7c6026d4
3 changed files with 26 additions and 1 deletions

View File

@@ -7,7 +7,8 @@
"test": "mocha",
"test-coverage": "istanbul cover _mocha",
"predeploy": "git log -1 --pretty=format:'{ \"date\":\"%cI\", \"commit\":\"%H\" }' > git-commit.json",
"deploy": "zip -r LATE-standard-redirects-for-cloudfront.zip . -i \\*.js -i git-commit.json -i node_modules/\\* -x test/\\* -x node_modules/aws-sdk/\\* -x node_modules/mocha/\\* && echo Uploading... && aws lambda update-function-code --region us-east-1 --function-name LATE-standard-redirects-for-cloudfront --zip-file fileb://LATE-standard-redirects-for-cloudfront.zip --publish"
"deploy": "zip -r LATE-standard-redirects-for-cloudfront.zip . -i \\*.js -i git-commit.json -i node_modules/\\* -x test/\\* -x node_modules/aws-sdk/\\* -x node_modules/mocha/\\* && echo Uploading... && aws lambda update-function-code --region us-east-1 --function-name LATE-standard-redirects-for-cloudfront --zip-file fileb://LATE-standard-redirects-for-cloudfront.zip --publish",
"package": "aws cloudformation package --template-file sam.yaml --output-template-file standard-redirects-for-cloudfront-sam.yaml --s3-bucket public.digital-sailors.de --s3-prefix serverless-application-repo/standard-redirects-for-cloudfront"
},
"dependencies": {},
"license": "Apache-2.0",

11
sam.yaml Normal file
View File

@@ -0,0 +1,11 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
StandardRedirectsForCloudFront:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs6.10
Description: 'Standard Redirects for CloudFront by Digital Sailors via the Serverless Application Repository'
MemorySize: 128
Timeout: 3

View File

@@ -0,0 +1,13 @@
AWSTemplateFormatVersion: '2010-09-09'
Resources:
StandardRedirectsForCloudFront:
Properties:
CodeUri: s3://public.digital-sailors.de/serverless-application-repo/standard-redirects-for-cloudfront//f67fc421792d57dd0adf0dbb485b974a
Description: Standard Redirects for CloudFront by Digital Sailors via the Serverless
Application Repository
Handler: index.handler
MemorySize: 128
Runtime: nodejs6.10
Timeout: 3
Type: AWS::Serverless::Function
Transform: AWS::Serverless-2016-10-31