From 226c3d07cc4a5fe59f51d51fca72d6a2e6b585a5 Mon Sep 17 00:00:00 2001 From: Andrii Riabchenko Date: Wed, 13 Mar 2024 13:36:54 +0200 Subject: [PATCH] new file: projects/aws.amazon.com/sam/package.yml new file: projects/aws.amazon.com/sam/template.yml --- projects/aws.amazon.com/sam/package.yml | 25 ++++++++++++++++++++++++ projects/aws.amazon.com/sam/template.yml | 17 ++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 projects/aws.amazon.com/sam/package.yml create mode 100644 projects/aws.amazon.com/sam/template.yml 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