You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the serverless deployment through the docker file and configuration from the serverless.yml but getiing the error related to plugin of serverless-plugin-log-subscription.
RUN mkdir -p /home/auth/dependencies
RUN pip3 install -U --platform manylinux2014_x86_64 --only-binary=:all: -t dependencies -r requirements.txt
RUN ls dependencies/
RUN npm install serverless
RUN npm i serverless-plugin-log-subscription
RUN echo Environment is $ENVIRONMENT
RUN env
RUN serverless deploy --stage qa
RUN aws --version
RUN python3 --version
CMD [aws --version]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello All,
I am running the serverless deployment through the docker file and configuration from the serverless.yml but getiing the error related to plugin of serverless-plugin-log-subscription.
if (config.enabled && service.provider.logs?.restApi && config.apiGatewayLogs && this.provider.naming.getApiGatewayLogGroupLogicalId) {
SyntaxError: Unexpected token '.'
=====here is my docker file ========
FROM public.ecr.aws/lts/ubuntu:latest
RUN apt install curl
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y software-properties-common gcc &&
add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y python3.9 python3-distutils python3-pip python3-apt libffi-dev libssl-dev
RUN apt-get install -y nodejs
RUN apt-get install -y npm
RUN pip3 install --upgrade pip
RUN pip3 install awscli
ARG ENVIRONMENT
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG AWS_SESSION_TOKEN
ARG AWS_REGION
RUN mkdir -p /home/auth
set working directory
WORKDIR /home/auth
add
/app/node_modules/.bin
to $PATHENV PATH /home/auth/node_modules/.bin:$PATH
ADD . /home/auth/
RUN mkdir -p /home/auth/dependencies
RUN pip3 install -U --platform manylinux2014_x86_64 --only-binary=:all: -t dependencies -r requirements.txt
RUN ls dependencies/
RUN npm install serverless
RUN npm i serverless-plugin-log-subscription
RUN echo Environment is $ENVIRONMENT
RUN env
RUN serverless deploy --stage qa
RUN aws --version
RUN python3 --version
CMD [aws --version]
=====serverles.yaml==============
service:auth-lambda
frameworkVersion: '3'
provider:
name: aws
runtime: python3.9
environment:
ENVIRONMENT: ${opt:stage}
S3_BUCKET_NAME: ${opt:stage}-auth-service-service-artifacts
iamRoleStatements:
- Effect: Allow
Action:
- ssm:GetParameter
Resource: "arn:aws:ssm:${aws:region}:${aws:accountId}:parameter/${opt:stage}/auth/tenants/"
- Effect: Allow
Action:
- s3:
Resource:
- "arn:aws:s3:::${opt:stage}-auth-service-service-artifacts/"
- Effect: Allow
Action:
- kms:Decrypt
Resource:
- "arn:aws:kms:${aws:region}:${aws:accountId}:key/"
plugins:
custom:
logSubscription:
enabled: true
apiGatewayLogs: false
destinationArn: 'arn:aws:lambda:${aws:region}:${aws:accountId}:function:elasticsearch'
roleArn: 'arn:aws:lambda:${aws:region}:${aws:accountId}:function:auth-lambda-${opt:stage}-value'
functions:
validateToken:
handler: handler.handle
resources:
Resources:
ApiGatewayInvokeLambdaPermission:
Type: "AWS::Lambda::Permission"
Properties:
Action: lambda:InvokeFunction
FunctionName: arn:aws:lambda:${aws:region}:${aws:accountId}:function:auth-lambda-${opt:stage}-value
Principal: apigateway.amazonaws.com
SourceArn: arn:aws:execute-api:${aws:region}:${aws:accountId}:ovh3n8txyg/authorizers/*
Beta Was this translation helpful? Give feedback.
All reactions