Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@tsed/platform-aws
Advanced tools
IMPORTANT: This package is deprecated in favor of @tsed/platform-serverless-http
or @tsed/platform-serverless
. Please don't use this package for new project!
A package of Ts.ED framework. See website: https://tsed.io/tutorials/aws.html
Run npm command (or yarn):
npm install --save @tsed/platform-aws
Create a new LambdaServer.ts
in src
directory:
import {PlatformAws} from "@tsed/platform-aws";
import "@tsed/platform-express";
// or import "@tsed/platform-koa"
PlatformAws.bootstrap(Server, {
aws: {
binaryMimeTypes: [
// optional
// mime types list
]
}
// additional Ts.ED options. See https://tsed.io/tutorials/aws.html
});
// Handler used by AWS
export const handler = PlatformAws.callback();
Then create lambda.js
on your root project:
module.exports = require("./dist/LambdaServer.js");
This file will be used by AWS to forward request to your application.
Finally, package and create your Lambda function, then configure a simple proxy API using Amazon API Gateway and integrate it with your Lambda function.
See more details on aws-serveless-express
project.
This package includes decorators to easily get the event object Lambda received from API Gateway:
import {Controller, Get} from "@tsed/common";
import {AwsEvent, AwsContext} from "@tsed/platform-aws";
@Controller("/")
class MyCtrl {
@Get("/")
get(@AwsEvent() event: any, @AwsContext() context: any) {
console.log("Event", apiGateway.event);
console.log("Context", apiGateway.context);
return apiGateway;
}
}
Please read contributing guidelines here
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
The MIT License (MIT)
Copyright (c) 2016 - 2018 Romain Lenzotti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Module to support AWS function with Ts.ED
The npm package @tsed/platform-aws receives a total of 2,289 weekly downloads. As such, @tsed/platform-aws popularity was classified as popular.
We found that @tsed/platform-aws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.