aws-mock-data
v1.2.0
Published
Mock data for AWS services
Downloads
967
Readme
AWS Mock Data
AWSome mock data for JavaScript/TypeScript based AWS services.
Description
AWS Mock Data is a package that provides mock data for testing AWS-related applications. It aims to simplify the process of generating realistic test data for various AWS services.
Installation
You can install AWS Mock Data using npm:
npm install --save-dev aws-mock-data
OR yarn:
yarn add --dev aws-mock-data
How to use
Cognito
To create mock cognito tokens, you can use the cognito
module in awsServices
.
import { awsServices, utils } from "aws-mock-data";
const keyPair = utils.getAsymmetricKeys();
const tokens = awsServices.cognito.getCognitoTokens({
asymmetricKeys: keyPair,
user: {
emailId: "<email-id>"
}
});
Cognito User Pool
To create Jwks for a cognito user pool, you can use the userPool
module in awsServices
.
import { awsServices, utils } from "aws-mock-data";
const keyPair = utils.getAsymmetricKeys();
const jwks = awsServices.userPool.getUserPoolJwks({
asymmetricKeys: keyPair
});