
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@aws-smithy/server-apigateway
Advanced tools
Base components for Smithy services behind APIGateway
This package provides glue code to enable using a server sdk inside of apigateway.
import { HttpRequest } from "@aws-sdk/protocol-http";
import {
GreetingService as __GreetingService,
SayHelloInput,
SayHelloOutput,
getGreetingServiceHandler,
} from "@greeting-service/service-greeting";
import { convertEvent, convertResponse } from "@aws-smithy/server-apigateway";
import { APIGatewayProxyEventV2, APIGatewayProxyResultV2, APIGatewayProxyHandlerV2 } from "aws-lambda";
class GreetingService implements __GreetingService {
SayHello(input: SayHelloInput, request: HttpRequest): SayHelloOutput {
return {
greeting: `Hello ${input.name}! How is ${input.city}?`,
};
}
}
const serviceHandler = getGreetingServiceHandler(new GreetingService());
export const lambdaHandler: APIGatewayProxyHandlerV2 = async (
event: APIGatewayProxyEventV2
): Promise<APIGatewayProxyResultV2> => {
console.log(`Received event: ${JSON.stringify(event)}`);
// Convert apigateway's lambda event to an HttpRequest.
const convertedEvent = convertEvent(event);
// Call the service handler, which will route the request to the GreetingService
// implementation and then serialize the response to an HttpResponse.
let rawResponse = await serviceHandler.handle(convertedEvent);
// Convert the HttpResponse to apigateway's expected format.
const convertedResponse = convertResponse(rawResponse);
console.log(`Returning response: ${JSON.stringify(convertedResponse)}`);
return convertedResponse;
};
FAQs
Base components for Smithy services behind APIGateway
The npm package @aws-smithy/server-apigateway receives a total of 1,726 weekly downloads. As such, @aws-smithy/server-apigateway popularity was classified as popular.
We found that @aws-smithy/server-apigateway demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.