
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
This package lets you handle and send responses from AWS lambda with ease. You have the ability to send various types of responses such as JSON or Plain Text without worrying about headers and status codes. You can also enable or disable cors for all or s
This package lets you handle and send responses from AWS lambda with ease. You have the ability to send various types of responses such as JSON or Plain Text without worrying about headers and status codes. You can also enable or disable cors for all or specific responses or set custom headers.
yarn add aws-ts
OR
npm install aws-ts
import { HttpResponse } from "aws-ts";
// or
// const { HttpResponse } = require('aws-ts')
const httpResponse = new HttpResponse();
export const handler = async (event) => {
const data = {
message: "Hey there",
};
return httpResponse.successResponse(data).json;
};
import { HttpResponse } from "aws-ts";
const httpResponse = new HttpResponse();
export const handler = async (event) => {
const html = "<h1>Hey there</h1>";
return httpResponse.html(html);
};
import { HttpResponse } from "aws-ts";
const httpResponse = new HttpResponse();
export const handler = async (event) => {
const data = {
message: "Hey there",
};
const headers = {
Authorization: "Bearer x3*********",
};
return httpResponse.successResponse(data, headers).json;
};
import { HttpResponse } from "aws-ts";
const httpResponse = new HttpResponse();
export const handler = async (event) => {
const data = {
message: "Hey there",
};
const headers = {
Authorization: "Bearer x3*********",
};
return httpResponse.status(304).successResponse(data, headers).json;
};
const httpResponse = new HttpResponse({ enableCors: true });
Example
import { HttpResponse } from "aws-ts";
const httpResponse = new HttpResponse({ enableCors: true });
export const handler = async (event) => {
const data = {
message: "Hey there",
};
const headers = {
Authorization: "Bearer x3*********",
};
return httpResponse.status(304).successResponse(data, headers).json;
};
return httpResponse.successResponse(data).withCors().json;
Example:
import { HttpResponse } from "aws-ts";
const httpResponse = new HttpResponse();
export const handler = async (event) => {
const data = {
message: "Hey there",
};
const headers = {
Authorization: "Bearer x3*********",
};
return httpResponse.status(304).successResponse(data, headers).withCors()
.json;
};
FAQs
This package lets you handle and send responses from AWS lambda with ease. You have the ability to send various types of responses such as JSON or Plain Text without worrying about headers and status codes. You can also enable or disable cors for all or s
We found that aws-ts 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.