This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deno-hello-world SAR application
Set RetentionPolicy=Retain for layer.
- Loading branch information
Showing
5 changed files
with
122 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Deno Hello World | ||
|
||
An example [deno](https://github.com/denoland/deno) lambda function on top of the | ||
[deno SAR application](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:390065572566:applications~deno). | ||
|
||
```ts | ||
import { | ||
APIGatewayProxyEvent, | ||
APIGatewayProxyResult, | ||
Context | ||
} from "https://deno.land/x/lambda/mod.ts"; | ||
|
||
export async function handler( | ||
event: APIGatewayProxyEvent, | ||
context: Context | ||
): Promise<APIGatewayProxyResult> { | ||
return { | ||
statusCode: 200, | ||
headers: { "content-type": "text/html;charset=utf8" }, | ||
body: `Hello World! Sent from deno ${Deno.version.deno} 🦕` | ||
}; | ||
} | ||
``` | ||
|
||
See the [README on github](https://github.com/hayd/deno-lambda) for more information. | ||
|
||
--- | ||
|
||
Made with ❤️ by Andy Hayden. | ||
Available on the [AWS Serverless Application Repository](https://aws.amazon.com/serverless). | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: > | ||
Deno example function blueprint for AWS Lambda | ||
Resources: | ||
Deno: | ||
Type: AWS::Serverless::Application | ||
Properties: | ||
Location: | ||
ApplicationId: arn:aws:serverlessrepo:us-east-1:390065572566:applications/deno | ||
SemanticVersion: DENO_LAMBDA_VERSION | ||
|
||
DenoHelloWorldFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: | ||
Bucket: DENO_LAMBDA_BUCKET | ||
Key: deno-lambda-example_DENO_LAMBDA_VERSION.zip | ||
MemorySize: 128 | ||
Handler: hello.handler | ||
Runtime: provided | ||
Layers: | ||
- !GetAtt Deno.Outputs.LayerArn | ||
Events: | ||
ApiEvent: | ||
Type: HttpApi | ||
|
||
Outputs: | ||
LayerArn: | ||
Value: !GetAtt Deno.Outputs.LayerArn | ||
|
||
Metadata: | ||
AWS::ServerlessRepo::Application: | ||
Name: deno-hello-world | ||
Description: | | ||
Deno example function blueprint for AWS Lambda | ||
Author: Andy Hayden | ||
SpdxLicenseId: MIT | ||
Labels: | ||
- deno | ||
- lambda | ||
- typescript | ||
- blueprint | ||
HomePageUrl: https://github.com/hayd/deno-lambda | ||
SemanticVersion: DENO_LAMBDA_VERSION | ||
SourceCodeUrl: https://github.com/hayd/deno-lambda/releases/tag/DENO_LAMBDA_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters