Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
amplify-js-local-fork
Advanced tools
Simple Amplify JS wrapper script for use with LocalStack
This project provides a thin wrapper script amplifylocal
for using the Amplify JS library against local APIs provided by LocalStack.
The amplifylocal
command line is published as an npm library:
$ npm install -g amplify-js-local @aws-amplify/cli
...
Note: The dependency @aws-amplify/cli
needs to be installed manually (to decouple the two libraries, and allow using arbitrary versions of @aws-amplify/cli
under the covers).
The version reported by amplifylocal
represents the version of the underlying @aws-amplify/cli
installation:
$ amplifylocal --version
4.41.0
The following environment variables can be configured:
EDGE_PORT
: Port under which LocalStack edge service is accessible (default: 4566
)LOCALSTACK_HOSTNAME
: Target host under which LocalStack edge service is accessible (default: localhost
)We can use a sample app provided by AWS to run a quick test for getting started:
$ git clone https://github.com/aws-samples/aws-amplify-graphql
$ cd aws-amplify-graphql
$ npm install
...
$ amplifylocal init
# press [ENTER] a few times to configure the defaults ...
...
$ amplifylocal add auth
...
$ amplifylocal add api
...
$ amplifylocal push
...
Once the deployment is done, you can inspect the created resources via the awslocal
command line:
$ awslocal appsync list-graphql-apis
{
"graphqlApis": [
{
"name": "awsamplifygraphql-dev",
"apiId": "1a6f1f11",
"authenticationType": "API_KEY",
"arn": "arn:aws:appsync:us-east-1:000000000000:apis/1a6f1f11",
"uris": {
"GRAPHQL": "http://localhost:4566/graphql/1a6f1f11",
"REALTIME": "ws://localhost:4510/graphql/1a6f1f11"
}
},
...
In addition to using the CLI, you should also be able to use the library in your local Node.js program.
// import and apply patches
const amplifyLocal = require('amplify-js-local/lib/index');
amplifyLocal.applyPatches();
// use regular amplify commands below (should automatically use the local endpoints)
...
The library can also be imported and used in your ES6 frontend code (e.g., React.js):
import Amplify from 'aws-amplify';
import applyPatches from 'amplify-js-local/lib/es6';
// apply patches
applyPatches();
// configure Amplify
Amplify.configure(...);
@aws-amplify/auth
endpointsThis code is distributed under the Apache License, Version 2.0.
FAQs
Simple Amplify JS wrapper script for use with LocalStack
The npm package amplify-js-local-fork receives a total of 0 weekly downloads. As such, amplify-js-local-fork popularity was classified as not popular.
We found that amplify-js-local-fork 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.