Created
September 6, 2022 14:32
-
-
Save talesmgodois/b98bb87d1cd834b7e362ece827a08d6c to your computer and use it in GitHub Desktop.
node 16 deploy error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-service", | |
"version": "1.4.0", | |
"private": true, | |
"main": "src/index.js", | |
"engines": { | |
"node": "^16.0.0", | |
"npm": "^8.11.0" | |
}, | |
"dependencies": { | |
"aws-sdk": "2.1025.0", | |
"axios": "0.20.0", | |
"serverless-associate-waf": "1.2.1", | |
"uuid": "8.3.2" | |
}, | |
"devDependencies": { | |
"@types/aws-lambda": "8.10.85", | |
"@types/jest": "27.0.0", | |
"@types/node": "16.11.7", | |
"@types/uuid": "8.3.0", | |
"@types/yup": "0.28.3", | |
"@typescript-eslint/eslint-plugin": "4.2.0", | |
"eslint": "7.9.0", | |
"eslint-config-prettier": "6.11.0", | |
"eslint-plugin-prettier": "3.1.4", | |
"jest": "27.2.5", | |
"jest-sonar-reporter": "2.0.0", | |
"nodemon": "2.0.4", | |
"prettier": "2.1.2", | |
"serverless": "3.22.0", | |
"serverless-offline": "10.0.0", | |
"serverless-prune-plugin": "2.0.1", | |
"serverless-versioning-plugin": "0.6.0", | |
"ts-jest": "27.0.5", | |
"typescript": "4.4.3" | |
}, | |
"scripts": { | |
"clean": "rm -rf dist coverage", | |
"lint": "eslint --ext .js,.ts src test", | |
"lint:fix": "npm run lint -- --fix", | |
"build": "npm run lint && tsc" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: my-service | |
plugins: | |
- serverless-offline | |
- serverless-prune-plugin | |
- serverless-versioning-plugin | |
provider: | |
name: aws | |
stage: ${opt:stage} | |
deploymentBucket: | |
name: ${self:custom.platform}-platform-296d976b-${self:provider.stage} | |
stackTags: | |
org: engineering | |
platform: ${self:custom.platform} | |
product: ${self:service} | |
environment: ${self:provider.stage} | |
provisioning: serverless | |
runtime: nodejs16.x | |
memorySize: 512 | |
timeout: 300 | |
logRetentionInDays: 90 | |
lambdaHashingVersion: 20201221 | |
environment: | |
NODE_ENV: ${env:NODE_ENV, 'production'} | |
SERVERLESS_STAGE: ${self:provider.stage} | |
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1 | |
LOG_LEVEL: info | |
iam: | |
role: | |
statements: | |
- Effect: Allow | |
Action: | |
- 's3:GetObject' | |
Resource: 'arn:aws:s3:::my-configs-${self:provider.stage}/${self:service}.json' | |
- Effect: Allow | |
Action: | |
- 'kms:Decrypt' | |
Resource: ${self:custom.aws.kms.configKey} | |
# VPC is only needed when connecting to an RDS database | |
vpc: | |
securityGroupIds: | |
- ${cf:lambdas-vpc.LambdaSecurityGroupID} | |
subnetIds: | |
- ${cf:lambdas-vpc.PrivateSubnetFourID} | |
- ${cf:lambdas-vpc.PrivateSubnetFiveID} | |
- ${cf:lambdas-vpc.PrivateSubnetSixID} | |
custom: | |
platform: marketplace | |
aws: ${file(./config/${self:provider.stage}.json):aws} | |
prune: | |
automatic: true | |
number: 1 | |
serverless-offline: | |
port: 4000 | |
package: | |
excludeDevDependencies: true | |
patterns: | |
- '!./**' | |
- 'node_modules/**' | |
- '!node_modules/**/aws-sdk/**' | |
- 'package.json' | |
- 'dist/**' | |
- 'config/**' | |
functions: | |
helloWorld: | |
handler: dist/handlers/helloWorld.handler | |
timeout: 30 | |
events: | |
- http: | |
path: v1/callback | |
method: GET | |
cors: true | |
response: | |
headers: | |
Strict-Transport-Security: "'max-age=31536000; includeSubDomains; preload'" | |
batchProcessor: | |
handler: dist/handlers/batchProcessor.handler | |
ping: | |
handler: dist/handlers/ping.handler | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment