new file: projects/aws.amazon.com/sam/package.yml

new file:   projects/aws.amazon.com/sam/template.yml
This commit is contained in:
Andrii Riabchenko 2024-03-13 13:36:54 +02:00 committed by Jacob Heider
parent 6ee814d182
commit 226c3d07cc
2 changed files with 42 additions and 0 deletions

View file

@ -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'

View file

@ -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