diff --git a/projects/aws.amazon.com/sam/package.yml b/projects/aws.amazon.com/sam/package.yml new file mode 100644 index 00000000..e0f126a0 --- /dev/null +++ b/projects/aws.amazon.com/sam/package.yml @@ -0,0 +1,25 @@ +distributable: + url: https://github.com/aws/aws-sam-cli/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + github: aws/aws-sam-cli + +dependencies: + pkgx.sh: ^1 + +build: + dependencies: + python.org: ^3.11 + rust-lang.org: '*' + script: + - bkpyvenv stage {{prefix}} {{version}} + - ${{prefix}}/venv/bin/pip install . + - bkpyvenv seal {{prefix}} sam + +provides: + - bin/sam + +test: + - sam --version | grep {{version}} + - sam validate --region us-east-1 2>&1 | grep 'is a valid SAM Template' diff --git a/projects/aws.amazon.com/sam/template.yml b/projects/aws.amazon.com/sam/template.yml new file mode 100644 index 00000000..aa8cfabf --- /dev/null +++ b/projects/aws.amazon.com/sam/template.yml @@ -0,0 +1,17 @@ +AWSTemplateFormatVersion: '2010-09-09' +Transform: AWS::Serverless-2016-10-31 +Description: A simple SAM template for a Lambda function triggered by API Gateway + +Resources: + HelloWorldFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: . + Events: + HelloWorldApi: + Type: Api + Properties: + Path: /hello + Method: get