Hi guys,
I am trying to deploy serverless using container image building and getting the following error: Error: ENOENT: no such file or directory, open ‘/erverless.yml’
Dockerfile:
FROM node:14-alpine
RUN apk add --no-cache wget
RUN wget -qO- https://cli.doppler.com/install.sh | sh
ARG DOPPLER_TOKEN
ARG NPM_TOKEN
ARG SERVERLESS_ACCESS_KEY
ARG ENVIRONMENT
ARG DOMAIN
COPY package.json .
COPY package-lock.json .
RUN npm config set @everybyte-io:registry https://npm.pkg.github.com/ && \
npm config set '//npm.pkg.github.com/:_authToken' "${NPM_TOKEN}" && \
npm ci --ignore-scripts
COPY . .
RUN npm i -g serverless
ENV SLS_DEBUG=*
RUN ["doppler", "run", "--", "serverless", "deploy"]
Serverless deploy output:
#15 2.322 Serverless: Load command interactiveCli
#15 2.324 Serverless: Load command config
#15 2.325 Serverless: Load command config:credentials
#15 2.325 Serverless: Load command config:tabcompletion
#15 2.325 Serverless: Load command config:tabcompletion:install
#15 2.325 Serverless: Load command config:tabcompletion:uninstall
#15 2.325 Serverless: Load command create
#15 2.325 Serverless: Load command install
#15 2.326 Serverless: Load command package
#15 2.326 Serverless: Load command deploy
#15 2.326 Serverless: Load command deploy:function
#15 2.326 Serverless: Load command deploy:list
#15 2.326 Serverless: Load command deploy:list:functions
#15 2.327 Serverless: Load command invoke
#15 2.327 Serverless: Load command invoke:local
#15 2.327 Serverless: Load command info
#15 2.327 Serverless: Load command logs
#15 2.327 Serverless: Load command metrics
#15 2.327 Serverless: Load command print
#15 2.328 Serverless: Load command remove
#15 2.328 Serverless: Load command rollback
#15 2.328 Serverless: Load command rollback:function
#15 2.328 Serverless: Load command slstats
#15 2.329 Serverless: Load command plugin
#15 2.329 Serverless: Load command plugin
#15 2.329 Serverless: Load command plugin:install
#15 2.329 Serverless: Load command plugin
#15 2.329 Serverless: Load command plugin:uninstall
#15 2.330 Serverless: Load command plugin
#15 2.330 Serverless: Load command plugin:list
#15 2.330 Serverless: Load command plugin
#15 2.330 Serverless: Load command plugin:search
#15 2.330 Serverless: Load command config
#15 2.330 Serverless: Load command config:credentials
#15 2.336 Serverless: Load command upgrade
#15 2.336 Serverless: Load command uninstall
#15 2.902 Serverless: Load command offline
#15 2.902 Serverless: Load command offline:start
#15 2.904 Serverless: Load command create_domain
#15 2.904 Serverless: Load command delete_domain
#15 2.905 Serverless: Load command login
#15 2.905 Serverless: Load command logout
#15 2.905 Serverless: Load command generate-event
#15 2.905 Serverless: Load command test
#15 2.905 Serverless: Load command dashboard
#15 2.905 Serverless: Load command output
#15 2.905 Serverless: Load command output:get
#15 2.905 Serverless: Load command output:list
#15 2.905 Serverless: Load command param
#15 2.905 Serverless: Load command param:get
#15 2.905 Serverless: Load command param:list
#15 2.906 Serverless: Load command studio
#15 5.666 Serverless: Using provider credentials, configured via dashboard: https://app.serverless.com/everybyteio/apps/integrations/segment/staging/us-east-1/providers
#15 6.441 Serverless: [AWS ssm 200 0.711s 0 retries] getParameter({ Name: '/devops/vpc/staging/SUBNET_ID_1', WithDecryption: true })
#15 6.453 Serverless: [AWS ssm 200 0.736s 0 retries] getParameter({ Name: '/devops/vpc/staging/SECURITY_GROUP_ID', WithDecryption: true })
#15 7.122 Serverless: [AWS ssm 200 0.678s 0 retries] getParameter({ Name: '/devops/vpc/staging/SUBNET_ID_2', WithDecryption: true })
#15 7.146 Serverless: [AWS ssm 200 0.692s 0 retries] getParameter({ Name: '/devops/vpc/staging/SUBNET_ID_3', WithDecryption: true })
#15 7.149 Serverless: Skipping variables resolution with old resolver (new resolver reported no more variables to resolve)
#15 7.570 Serverless: Invoke deploy
#15 7.570 Serverless: Invoke package
#15 7.570 Serverless: Invoke aws:common:validate
#15 7.570 Serverless: Invoke aws:common:cleanupTempDir
#15 7.574 Serverless: Compiling with Typescript...
#15 7.588 Serverless: Using local tsconfig.json - tsconfig.json
#15 10.51 Serverless: Typescript compiled.
#15 39.81 Serverless: [AWS sts 200 32.203s 0 retries] getCallerIdentity({})
#15 40.91 Serverless: Packaging service...
#15 40.91 Serverless: Excluding development dependencies...
#15 60.84 Serverless: Invoke aws:package:finalize
#15 72.82 Serverless: [AWS sts 200 11.981s 2 retries] getCallerIdentity({})
#15 73.62 Serverless: Invoke aws:common:moveArtifactsToPackage
#15 73.63 Serverless: Invoke aws:common:validate
#15 75.11 Serverless: Invoke aws:deploy:deploy
#15 75.85 Serverless: [AWS cloudformation 200 0.727s 0 retries] describeStacks({ StackName: 'segment-staging' })
#15 75.86 Serverless: Ensuring that deployment bucket exists
#15 76.51 Serverless: [AWS cloudformation 200 0.64s 0 retries] describeStackResource({
#15 76.51 StackName: 'segment-staging',
#15 76.51 LogicalResourceId: 'ServerlessDeploymentBucket'
#15 76.51 })
#15 77.17 Serverless: [AWS s3 200 0.666s 0 retries] headBucket({ Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2' })
#15 77.80 Serverless: [AWS s3 200 0.627s 0 retries] listObjectsV2({
#15 77.80 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 77.80 Prefix: 'serverless/segment/staging'
#15 77.80 })
#15 78.47 Serverless: [AWS s3 200 0.663s 0 retries] headObject({
#15 78.47 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 78.47 Key: 'serverless/segment/staging/1641741500191-2022-01-09T15:18:20.191Z/segment.zip'
#15 78.47 })
#15 78.50 Serverless: [AWS s3 200 0.696s 0 retries] headObject({
#15 78.50 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 78.50 Key: 'serverless/segment/staging/1641741500191-2022-01-09T15:18:20.191Z/compiled-cloudformation-template.json'
#15 78.50 })
#15 79.21 Serverless: [AWS lambda 200 0.726s 0 retries] getFunction({ FunctionName: 'segment-staging-save-segment-data-to-db' })
#15 79.21 Serverless: [AWS lambda 200 0.707s 0 retries] getFunction({ FunctionName: 'segment-staging-graphql' })
#15 79.29 Serverless: Uploading CloudFormation file to S3...
#15 80.35 Serverless: [AWS s3 200 1.055s 0 retries] putObject({
#15 80.35 Body: <Buffer 7b 22 41 57 53 54 65 6d 70 6c 61 74 65 46 6f 72 6d 61 74 56 65 72 73 69 6f 6e 22 3a 22 32 30 31 30 2d 30 39 2d 30 39 22 2c 22 44 65 73 63 72 69 70 74 ... 10449 more bytes>,
#15 80.35 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 80.35 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/compiled-cloudformation-template.json',
#15 80.35 ContentType: 'application/json',
#15 80.35 Metadata: { filesha256: 'r9wU7r8nuCK6wWhbw800tFYaGHWENxW3LQSKB4rJyCI=' }
#15 80.35 })
#15 80.35 Serverless: Uploading artifacts...
#15 80.36 Serverless: Uploading service segment.zip file to S3 (15.97 MB)...
#15 81.15 Serverless: [AWS s3 200 0.742s 0 retries] createMultipartUpload({
#15 81.15 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 81.15 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/segment.zip',
#15 81.15 ContentType: 'application/zip',
#15 81.15 Metadata: { filesha256: '6YrZSzOM0I4lJZZ2JpAftV4TXG3P+18esNma+lSwDo8=' }
#15 81.15 })
#15 90.81 Serverless: [AWS s3 200 9.684s 0 retries] uploadPart({
#15 90.81 Body: <Buffer 63 e9 18 2f b0 c3 87 4c 48 76 f8 88 65 33 2c c8 34 97 6c c6 6f 0d 8e aa 29 8b f2 54 cd b8 62 fc 36 2b eb 9c e7 49 51 d9 8b 01 bd 95 c2 1d 6c bc c4 c6 ... 5242830 more bytes>,
#15 90.81 ContentLength: 5242880,
#15 90.81 PartNumber: 2,
#15 90.81 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 90.81 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/segment.zip',
#15 90.81 UploadId: 'C1lTrau4hPBzdJP2hnqlxZdKkz.HeluxsI34a9Yv1ITToUarC7pe4SKL4v6Aqyp.1Wig8vEwG3h_98brsj_jOhswLFdjfwmewdl82un61F.ntIyf08LZD_hvr67k6cABTb77w9d6etKsVfssfb9xIAM8oiuBfQSU3jIqkWkrpts-'
#15 90.81 })
#15 90.99 Serverless: [AWS s3 200 9.848s 0 retries] uploadPart({
#15 90.99 Body: <Buffer 44 15 a9 52 67 6d f2 6a 87 cd d1 d2 ba e2 57 f3 88 5f a9 88 6f 4e 24 27 9d ce d9 f6 27 ae bb b0 7b 48 32 f2 31 d8 fc 63 70 f8 d7 8d 94 c6 0c 71 1b 1b ... 5242830 more bytes>,
#15 90.99 ContentLength: 5242880,
#15 90.99 PartNumber: 3,
#15 90.99 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 90.99 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/segment.zip',
#15 90.99 UploadId: 'C1lTrau4hPBzdJP2hnqlxZdKkz.HeluxsI34a9Yv1ITToUarC7pe4SKL4v6Aqyp.1Wig8vEwG3h_98brsj_jOhswLFdjfwmewdl82un61F.ntIyf08LZD_hvr67k6cABTb77w9d6etKsVfssfb9xIAM8oiuBfQSU3jIqkWkrpts-'
#15 90.99 })
#15 91.14 Serverless: [AWS s3 200 10.032s 0 retries] uploadPart({
#15 91.14 Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 17 00 00 00 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 2e 62 69 6e 2f 61 63 ... 5242830 more bytes>,
#15 91.14 ContentLength: 5242880,
#15 91.14 PartNumber: 1,
#15 91.14 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 91.14 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/segment.zip',
#15 91.14 UploadId: 'C1lTrau4hPBzdJP2hnqlxZdKkz.HeluxsI34a9Yv1ITToUarC7pe4SKL4v6Aqyp.1Wig8vEwG3h_98brsj_jOhswLFdjfwmewdl82un61F.ntIyf08LZD_hvr67k6cABTb77w9d6etKsVfssfb9xIAM8oiuBfQSU3jIqkWkrpts-'
#15 91.14 })
#15 94.16 Serverless: [AWS s3 200 3.35s 0 retries] uploadPart({
#15 94.16 Body: <Buffer 00 00 00 21 00 43 8d 80 1a e8 02 00 00 4d 06 00 00 1b 00 00 00 00 00 00 00 00 00 20 00 a4 81 08 6b 93 00 6e 6f 64 65 5f 6d 6f 64 75 6c 65 73 2f 6c 6f ... 243415 more bytes>,
#15 94.16 ContentLength: 243465,
#15 94.16 PartNumber: 4,
#15 94.16 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 94.16 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/segment.zip',
#15 94.16 UploadId: 'C1lTrau4hPBzdJP2hnqlxZdKkz.HeluxsI34a9Yv1ITToUarC7pe4SKL4v6Aqyp.1Wig8vEwG3h_98brsj_jOhswLFdjfwmewdl82un61F.ntIyf08LZD_hvr67k6cABTb77w9d6etKsVfssfb9xIAM8oiuBfQSU3jIqkWkrpts-'
#15 94.16 })
#15 94.90 Serverless: [AWS s3 200 0.73s 0 retries] completeMultipartUpload({
#15 94.90 MultipartUpload: {
#15 94.90 Parts: [
#15 94.90 { ETag: '"9023e1bd6d8f439fcab21ee0f8ff3233"', PartNumber: 1 },
#15 94.90 { ETag: '"3d6e4f1fd12f8340824301b906b23f11"', PartNumber: 2 },
#15 94.90 { ETag: '"a833f42673dced695cad2d0356e0acb1"', PartNumber: 3 },
#15 94.90 { ETag: '"a823e3de9484da502b381162d2718c52"', PartNumber: 4 },
#15 94.90 [length]: 4
#15 94.90 ]
#15 94.90 },
#15 94.90 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 94.90 Key: 'serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/segment.zip',
#15 94.90 UploadId: 'C1lTrau4hPBzdJP2hnqlxZdKkz.HeluxsI34a9Yv1ITToUarC7pe4SKL4v6Aqyp.1Wig8vEwG3h_98brsj_jOhswLFdjfwmewdl82un61F.ntIyf08LZD_hvr67k6cABTb77w9d6etKsVfssfb9xIAM8oiuBfQSU3jIqkWkrpts-'
#15 94.90 })
#15 94.90 Serverless: Validating template...
#15 95.72 Serverless: [AWS cloudformation 200 0.822s 0 retries] validateTemplate({
#15 95.72 TemplateURL: 'https://s3.amazonaws.com/segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2/serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/compiled-cloudformation-template.json'
#15 95.72 })
#15 95.73 Serverless: Updating Stack...
#15 96.81 Serverless: [AWS cloudformation 200 1.076s 0 retries] updateStack({
#15 96.81 StackName: 'segment-staging',
#15 96.81 Capabilities: [ 'CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM', [length]: 2 ],
#15 96.81 Parameters: [ [length]: 0 ],
#15 96.81 TemplateURL: 'https://s3.amazonaws.com/segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2/serverless/segment/staging/1641741822272-2022-01-09T15:23:42.272Z/compiled-cloudformation-template.json',
#15 96.81 Tags: [ { Key: 'STAGE', Value: 'staging' }, [length]: 1 ]
#15 96.81 })
#15 96.81 Serverless: Checking Stack update progress...
#15 103.0 Serverless: [AWS cloudformation 200 1.18s 0 retries] describeStackEvents({
#15 103.0 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 103.0 })
#15 103.0 .Serverless: [AWS cloudformation 200 1.09s 0 retries] describeStackEvents({
#15 109.1 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 109.1 })
#15 115.1 Serverless: [AWS cloudformation 200 0.993s 0 retries] describeStackEvents({
#15 115.1 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 115.1 })
#15 121.7 Serverless: [AWS cloudformation 200 1.568s 0 retries] describeStackEvents({
#15 121.7 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 121.7 })
#15 127.7 Serverless: [AWS cloudformation 200 0.982s 0 retries] describeStackEvents({
#15 127.7 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 127.7 })
#15 133.7 Serverless: [AWS cloudformation 200 1.028s 0 retries] describeStackEvents({
#15 133.7 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 133.7 })
#15 139.9 Serverless: [AWS cloudformation 200 1.169s 0 retries] describeStackEvents({
#15 139.9 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 139.9 })
#15 139.9 ..Serverless: [AWS cloudformation 200 0.953s 0 retries] describeStackEvents({
#15 145.8 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 145.8 })
#15 152.0 Serverless: [AWS cloudformation 200 1.182s 0 retries] describeStackEvents({
#15 152.0 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 152.0 })
#15 158.5 Serverless: [AWS cloudformation 200 1.446s 0 retries] describeStackEvents({
#15 158.5 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 158.5 })
#15 164.8 Serverless: [AWS cloudformation 200 1.252s 0 retries] describeStackEvents({
#15 164.8 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 164.8 })
#15 170.8 Serverless: [AWS cloudformation 200 1.02s 0 retries] describeStackEvents({
#15 170.8 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 170.8 })
#15 170.8 ..Serverless: [AWS cloudformation 200 1.067s 0 retries] describeStackEvents({
#15 176.9 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 176.9 })
#15 176.9 .......Serverless: [AWS cloudformation 200 1.018s 0 retries] describeStackEvents({
#15 182.9 StackName: 'arn:aws:cloudformation:us-east-1:217180300355:stack/segment-staging/1c81d990-7071-11ec-bb27-0eeab89089ef'
#15 182.9 })
#15 182.9 ...
#15 182.9 Serverless: Stack update finished...
#15 182.9 Serverless: Invoke aws:info
#15 183.6 Serverless: [AWS cloudformation 200 0.673s 0 retries] describeStacks({ StackName: 'segment-staging' })
#15 184.3 Serverless: [AWS cloudformation 200 0.752s 0 retries] listStackResources({ StackName: 'segment-staging', NextToken: undefined })
#15 184.3 Service Information
#15 184.3 service: segment
#15 184.3 stage: staging
#15 184.3 region: us-east-1
#15 184.3 stack: segment-staging
#15 184.3 resources: 21
#15 184.3 api keys:
#15 184.3 None
#15 184.3 endpoints:
#15 184.3 POST - https://1hcp4m2tvl.execute-api.us-east-1.amazonaws.com/graphql
#15 184.3 GET - https://1hcp4m2tvl.execute-api.us-east-1.amazonaws.com/graphql
#15 184.3 functions:
#15 184.3 save-segment-data-to-db: segment-staging-save-segment-data-to-db
#15 184.3 graphql: segment-staging-graphql
#15 184.3 layers:
#15 184.3 None
#15 185.0 Serverless Domain Manager: Info: Found apiId: 1hcp4m2tvl for api-stg.everybyte.io
#15 187.3 Serverless Domain Manager: Info: Updated API mapping to 'integrations/segment' for api-stg.everybyte.io
#15 187.3 Serverless Domain Manager: Summary: Distribution Domain Name
#15 187.3 Serverless Domain Manager: Domain Name: api-stg.everybyte.io
#15 187.3 Serverless Domain Manager: Target Domain: d-xbxr1wn366.execute-api.us-east-1.amazonaws.com
#15 187.3 Serverless Domain Manager: Hosted Zone Id: Z1UJRXOUMOOFQ8
#15 187.3 Serverless: Invoke aws:deploy:finalize
#15 188.0 Serverless: [AWS s3 200 0.677s 0 retries] listObjectsV2({
#15 188.0 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 188.0 Prefix: 'serverless/segment/staging'
#15 188.0 })
#15 188.0 Serverless: Removing old service artifacts from S3...
#15 188.7 Serverless: [AWS s3 200 0.703s 0 retries] deleteObjects({
#15 188.7 Bucket: 'segment-staging-serverlessdeploymentbucket-1u9h1j94i45p2',
#15 188.7 Delete: {
#15 188.7 Objects: [
#15 188.7 {
#15 188.7 Key: 'serverless/segment/staging/1641720541815-2022-01-09T09:29:01.815Z/compiled-cloudformation-template.json'
#15 188.7 },
#15 188.7 {
#15 188.7 Key: 'serverless/segment/staging/1641720541815-2022-01-09T09:29:01.815Z/segment.zip'
#15 188.7 },
#15 188.7 [length]: 2
#15 188.7 ]
#15 188.7 }
#15 188.7 })
#15 188.7 Serverless: Publishing service to the Serverless Dashboard...
#15 188.7 Serverless: Publishing service to the Serverless Dashboard...
#15 188.8 Serverless: Publication to Serverless Dashboard errored with:
#15 188.8 Error: ENOENT: no such file or directory, open '/erverless.yml'
#15 188.8
#15 188.8 Error ---------------------------------------------------
#15 188.8
#15 188.8 Error: ENOENT: no such file or directory, open '/erverless.yml'
#15 188.8
#15 188.8 Get Support --------------------------------------------
#15 188.8 Docs: docs.serverless.com
#15 188.8 Bugs: github.com/serverless/serverless/issues
#15 188.8 Issues: forum.serverless.com
#15 188.8
#15 188.8 Your Environment Information ---------------------------
#15 188.8 Operating System: linux
#15 188.8 Node Version: 14.18.2
#15 188.8 Framework Version: 2.70.0
#15 188.8 Plugin Version: 5.5.3
#15 188.8 SDK Version: 4.3.0
#15 188.8 Components Version: 3.18.1
#15 188.8
------
executor failed running [doppler run -- serverless deploy]: exit code: 1
Serverless.yml
org: everybyteio
app: integrations
service: segment
variablesResolutionMode: 20210326
frameworkVersion: '2'
provider:
name: aws
runtime: nodejs14.x
logRetentionInDays: 3
region: us-east-1
stage: ${env:ENVIRONMENT, 'development'}
lambdaHashingVersion: 20201221
httpApi:
cors: true
authorizers:
tokenValidation:
identitySource: $request.header.Authorization
issuerUrl: https://${env:AUTH0_TENET_DOMAIN}/
audience:
- ${env:AUTH0_API_IDENTIFIER}
vpc:
securityGroupIds:
- ${ssm:/devops/vpc/${env:ENVIRONMENT}/SECURITY_GROUP_ID, ''}
subnetIds:
- ${ssm:/devops/vpc/${env:ENVIRONMENT}/SUBNET_ID_1, ''}
- ${ssm:/devops/vpc/${env:ENVIRONMENT}/SUBNET_ID_2, ''}
- ${ssm:/devops/vpc/${env:ENVIRONMENT}/SUBNET_ID_3, ''}
plugins:
- serverless-plugin-typescript
- serverless-offline
- serverless-plugin-common-excludes
- serverless-domain-manager
custom:
serverless-offline:
port: 4000
customDomain:
domainName: ${env:DOMAIN, ''}
stage: ${self:provider.stage}
basePath: integrations/segment
apiType: http
endpointType: regional
functions:
save-segment-data-to-db:
handler: src/funcs/index.saveSegmentDataToDB
timeout: 29
environment:
ENVIRONMENT: ${env:ENVIRONMENT, 'development'}
MONGO_AUTHSOURCE: ${env:MONGO_AUTHSOURCE, ''}
MONGO_DBNAME: ${env:MONGO_DBNAME}
MONGO_HOST: ${env:MONGO_HOST}
MONGO_PASSWORD: ${env:MONGO_PASSWORD, ''}
MONGO_USER: ${env:MONGO_USER, ''}
MONGO_ATLAS: ${env:MONGO_ATLAS, ''}
MONGO_AUTH_MECHANISM: ${env:MONGO_AUTH_MECHANISM, ''}
graphql:
handler: src/funcs/index.graphql
timeout: 29
environment:
ENVIRONMENT: ${env:ENVIRONMENT, 'development'}
MONGO_AUTHSOURCE: ${env:MONGO_AUTHSOURCE, ''}
MONGO_DBNAME: ${env:MONGO_DBNAME}
MONGO_HOST: ${env:MONGO_HOST}
MONGO_PASSWORD: ${env:MONGO_PASSWORD, ''}
MONGO_USER: ${env:MONGO_USER, ''}
MONGO_ATLAS: ${env:MONGO_ATLAS, ''}
MONGO_AUTH_MECHANISM: ${env:MONGO_AUTH_MECHANISM, ''}
events:
- httpApi:
path: /graphql
method: post
authorizer:
name: tokenValidation
scopes:
- read:analytics
- httpApi:
path: /graphql
method: get
authorizer:
name: tokenValidation
scopes:
- read:analytics
When running locally with the same environment variables using the following command:
doppler run -- serverless deploy
It works perfectly.
Any ideas what causing this behavior? I don’t know what to do.
Regards,
Eliron