{"version":"1.0.7","license":"MIT","author":{"name":"Adrian Praja","email":"adrian@databank.io","url":"https://awspilot.dev"},"name":"aws-lambda","description":"Deploy AWS Lambda functions from command line using a json or yaml config file.","keywords":["lambda","aws lambda","deploy","deploy lambda"],"homepage":"https://awspilot.dev","bugs":{"url":"https://github.com/awspilot/cli-lambda-deploy/issues"},"repository":{"type":"git","url":"git+https://github.com/awspilot/cli-lambda-deploy.git"},"main":"lib/main.js","bin":{"lambda":"bin/lambda"},"dependencies":{"aws-sdk":"^2.814.0","js-yaml":"^3.14.1","watchpack":"^2.0.0-beta.10","commander":"^3.0.2"},"devDependencies":{"eslint":"^8.2.0","mocha":"^9.1.3"},"scripts":{"test":"mocha --timeout 100000 -S -R spec --exit","lint":"eslint lib"},"gitHead":"a020f90092f160e34c968828f4ca353d3a4afe92","_id":"aws-lambda@1.0.7","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-9GNFMRrEMG5y3Jvv+V4azWvc+qNWdWLTjDdhf/zgMlz8haaaLWv0xeAIWxz9PuWUBawsVxy0zZotjCdR3Xq+2w==","shasum":"c6b674df47458b5ecd43ab734899ad2e2d457013","tarball":"http://registry-npm.ywwl.com/aws-lambda/download/aws-lambda-1.0.7.tgz","fileCount":7,"unpackedSize":26144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2kIlCRA9TVsSAnZWagAARAkP/jVCcsJ5sfN/iYnRQYO3\nRgRBTU6G7cc96tnEf8O7XxrduPSVA2ggzl9Xa5+mn5LU1R12AWEyEcjjkDUv\n29KL6fT/FeIvR8WNh2jEtHnoB2FjIdB/WWckOTI8ccXVZI7D3Quh27jBV1hZ\n99/aSuTeRdFoQ85jELEIucD6+ALWh+bsW4y78gvMFp/nr3fdvAIvl9cSzyy2\n98pDNVdhuNR6rNM3aNUp/sLze+tigx0Dl8/xUYTmVDAiA4fCxbu+EFjHCd9o\nN590crhudLrtYnL1h/xjFf8FpEHTFzs6YiTA/ezhBF6ijD+emYHhTntnKEnW\n32q1nveqbdjbm3jO7VGEdDIOtbo7kCwG9nVp8HPM2JUhQi1UZ/jMP3IxbnAR\ndHIJ3vSo7P3mlWqkvRu+uqDfkbu0+EBMDEnAshQy/PIhrr43cOpM+nHflSEJ\nyOQWrLywpMjcpXzfRQwhlCXdMf7ar1kZVQimfsg8OurLvXqaqh9FbaqEJBSu\nRthycpy1+jPJd9Su8BgbZ6NjJPIlgY2hpzKhoKS6XWTWOzHWE4XcMvnNZ3Bo\nT6/HV0b7ADHfk5OpfnR9obWzFCUMg76KYsYskM/AcdxqwzpOCTrfx8QQEOiu\nEg926+b/qxraof5iDw3SpyUdTWKZxSGy5FZOZKm39WEXF5uFIyegdPQ5b24d\nsUbp\r\n=Poiu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHShhd8KoHw2XraAngBtqG+5jXwdkdE4rVtkNKPNKOuHAiAwfCU5ybXGRtEtm1icv+NJRDdVFRL/EP78dFBnY2oMtA=="}],"size":7406,"noattachment":false,"key":"/aws-lambda/-/aws-lambda-1.0.7.tgz"},"_npmUser":{"name":"adrian.praja","email":"adrian@databank.ro"},"directories":{},"maintainers":[{"name":"adrian.praja","email":"adrian@databank.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aws-lambda_1.0.7_1636278963957_0.7673266964807033"},"_hasShrinkwrap":false,"readme":"\n\n# cli-lambda-deploy\nCommand line tool deploy code to [AWS Lambda](http://aws.amazon.com/lambda/).  \n\n\n[![npm test](https://github.com/awspilot/cli-lambda-deploy/actions/workflows/test.yml/badge.svg)](https://github.com/awspilot/cli-lambda-deploy/actions/workflows/test.yml)\n[![Downloads](https://img.shields.io/npm/dm/aws-lambda?maxAge=2592000)](https://www.npmjs.com/package/aws-lambda)\n[![Downloads](https://img.shields.io/npm/dy/aws-lambda?maxAge=2592000)](https://www.npmjs.com/package/aws-lambda)\n[![Downloads](https://img.shields.io/npm/dt/aws-lambda?maxAge=2592000)](https://www.npmjs.com/package/aws-lambda)\n\n### Notes\n\nVersions prior to 1.0.5 suffer from \"Command Injection\" vulnerability,  \nthanks [snyk.io](https://snyk.io/vuln) and [Song Li](http://songli.io) of Johns Hopkins University for reporting.\n\n## Installation\n\n```\nnpm install -g aws-lambda\n```\n\nWARN: upgrading to v1.0.0 will remove your function environment and layers if they are not defined in the config file  \n\n## Config file\n\n* PATH must point to your code folder and is relative to the config file  \n* PATH can be relative or absolute  \n* If not set, Runtime defaults to **nodejs10.x**  \n* If not set, FunctionName defaults to the name of the config file (\"my-function\" in this case)  \n* You can use **Ref** to reference environment variables in the form of env.YOUR_ENVIRONMENT_NAME  \n* `lambda deploy <file.lambda>` credentials needs permissions to **CreateFunction**, **UpdateFunctionConfiguration** and **UpdateFunctionCode**  \n* `lambda delete <file.lambda>` credentials needs permissions to **DeleteFunction**  \n* `lambda invoke <file.lambda>` credentials needs permissions to **InvokeFunction**  \n\n\n## Sample JSON config\n\n```\n\n{\n\t\"PATH\": \"./test-function\",\n\t\"AWS_KEY\": { \"Ref\" : \"env.AWS_ACCESS_KEY_ID\" },,\n\t\"AWS_SECRET\": { \"Ref\" : \"env.AWS_SECRET_ACCESS_KEY\"},\n\t\"AWS_REGION\": \"us-east-1\",\n\n\t\"FunctionName\": \"test-lambda\",\n\t\"Role\": \"your_amazon_role\",\n\t\"Runtime\": \"nodejs10.x\",\n\t\"Handler\": \"index.handler\",\n\t\"MemorySize\": \"128\",\n\t\"Timeout\": \"3\",\n\t\"Environment\": {\n\t\t\"Variables\": {\n\t\t\t\"Hello\": \"World\",\n\t\t}\n\t},\n\t\"Layers\": [\n\t\t\"arn:aws:lambda:eu-central-1:452980636694:layer:awspilot-dynamodb-2_0_0-beta:1\"\n\t],\n\t\"Tags\": {\n\t\t\"k1\": \"v1\",\n\t\t\"k2\": \"v2\"\n\t},\n\t\"Description\": \"\"\n}\n```\n\n## Sample YAML config\n\n```\n# unlike json, comments are allowed in yaml, yey!\n# remember to use spaces not tabs 😞\nPATH: ./new-function\nAWS_KEY:  !Ref \"env.lambda_deploy_aws_key\"\nAWS_SECRET: !Ref \"env.lambda_deploy_aws_secret\"\nAWS_REGION: \"eu-central-1\"\n\nFunctionName: new-function-v12\nRole: \"arn:aws:iam::452980636694:role/CliLambdaDeploy-TestRole-1H89NZ845HHBK\"\nRuntime: \"nodejs8.10\"\nHandler: \"index.handler\"\nMemorySize: \"128\"\nTimeout: \"3\"\nEnvironment:\n    Variables:\n        Hello: \"World\"\nLayers:\n    - \"arn:aws:lambda:eu-central-1:452980636694:layer:awspilot-dynamodb-2_0_0-beta:1\"\nTags:\n    k1: v1\n    k2: v2\nDescription: \"\"\n```\n\n\n\n## Deploy from Local to AWS Lambda\n\n```\n// if installed globally then\n$ lambda deploy /path/to/my-function.lambda\n$ lambda deploy ../configs/my-function.lambda\n\n// if 'npm installed' without the -g then you must use the full path\n$ node_modules/.bin/lambda /path/to/my-function.lambda\n\n// you can also add it in your scripts section of your package.json scripts: { \"deploy-func1\": \"lambda deploy ../config/func1.lambda\" }\n$ npm run deploy-func1\n```\n\n## Watch config file\n\naws-lambda can also watch the config file and the code folder specified in the config.PATH for changes and re-reploy on change\n\n```\n$ lambda start ../configs/my-function.lambda\n```\n","publish_time":1636278964082,"_cnpm_publish_time":1636278964082,"dist-tags":{"latest":"1.0.7"}}