Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #33 from hayd/mv
Browse files Browse the repository at this point in the history
 Rename directories and SAR application name
  • Loading branch information
hayd authored Jan 15, 2020
2 parents 9e26b02 + c304f96 commit 03631b8
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
sudo apt -qq update &> /dev/null
sudo apt -qq install -y awscli python3-setuptools &> /dev/null
aws s3 cp --quiet deno-lambda-layer.zip s3://$DENO_LAMBDA_BUCKET/deno-lambda-layer_$DENO_LAMBDA_VERSION.zip --acl public-read
cd layer
cd sar
sed -i -e s/DENO_LAMBDA_BUCKET/$DENO_LAMBDA_BUCKET/g template.yml
sed -i -e s/DENO_LAMBDA_VERSION/$DENO_LAMBDA_VERSION/g template.yml
pip3 -q install -U --force pip
Expand Down
2 changes: 1 addition & 1 deletion CONSOLE.md → QUICK-START.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Console Quick Start
## Quick Start in the AWS console

From the [AWS console](https://console.aws.amazon.com/lambda/):

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ APIGateway use `APIGatewayProxyEvent` and `APIGatewayProxyResult`, SQS use `SQSE
## Examples

- Hello example ([`deno-lambda-example.zip`](https://github.com/hayd/deno-lambda/releases/))
- Web example (behind API Gateway) using dynamodb, see `/example` directory.
- Web example (behind API Gateway) using dynamodb, see `/example-serverless` directory.

## Deployment

### Serverless

See /example.
See /example-serverless.

### SAM

Expand All @@ -71,7 +71,7 @@ Deploy the layer via the
[SAR application](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:390065572566:applications~Deno)
or upload the
[deno-lambda-layer.zip](https://github.com/hayd/deno-lambda/releases)
manually (see `CONSOLE.md`). Reference the layer by ARN in your Lambda function.
manually (see `QUICK-START.md`). Reference the layer by ARN in your Lambda function.

## Warning

Expand Down
9 changes: 7 additions & 2 deletions example/README.md → example-serverless/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Serverless example
# Serverless

Deploy in a single step using [`serverless deploy`](https://serverless.com/framework/docs/providers/aws/guide/deploying/).

Expand All @@ -11,9 +11,14 @@ The application defines in `serverless.yml`:
Note: The `serverless-scriptable-plugin` is used to compile `api/candidate.ts` prior to deployment
so that there is no init-time download/compilation step.

### Requirements

```sh
# Install the serverless cli
npm install -g serverless

# Install serverless-scriptable-plugin:
npm install --save-dev serverless-scriptable-plugin
npm install -g serverless-scriptable-plugin
```

---
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions example/serverless.yml → example-serverless/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ resources:
Type: AWS::Serverless::Application
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:390065572566:applications/Deno
SemanticVersion: 0.7.0
ApplicationId: arn:aws:serverlessrepo:us-east-1:390065572566:applications/deno
SemanticVersion: 0.0.9

candidatesTable:
Type: AWS::DynamoDB::Table
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions layer/template.yml → sar/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Resources:
DenoLambdaLayer:
Type: AWS::Lambda::LayerVersion
Properties:
LayerName: Deno
Description: A deno runtime for AWS Lambda - deno-lambda DENO_LAMBDA_VERSION
LayerName: deno
Description: deno-lambda DENO_LAMBDA_VERSION
Content:
S3Bucket: DENO_LAMBDA_BUCKET
S3Key: deno-lambda-layer_DENO_LAMBDA_VERSION.zip
Expand All @@ -19,7 +19,7 @@ Outputs:

Metadata:
AWS::ServerlessRepo::Application:
Name: Deno
Name: deno
Description: |
A deno runtime for AWS Lambda
Author: Andy Hayden
Expand All @@ -31,4 +31,4 @@ Metadata:
- typescript
HomePageUrl: https://github.com/hayd/deno-lambda
SemanticVersion: DENO_LAMBDA_VERSION
SourceCodeUrl: https://github.com/hayd/deno-lambda
SourceCodeUrl: https://github.com/hayd/deno-lambda/releases/tag/DENO_LAMBDA_VERSION

0 comments on commit 03631b8

Please sign in to comment.