Last active
April 5, 2022 06:07
-
-
Save emilhein/73ced03ee895b73ea2c7259c36565bb8 to your computer and use it in GitHub Desktop.
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: functions | |
package: | |
individually: true | |
exclude: | |
- node_modules/aws-sdk/** #Its already included in the aws lambda environment | |
custom: | |
webpack: | |
webpackConfig: ./webpack.config.js | |
includeModules: | |
forceExclude: | |
- aws-sdk | |
- chrome-aws-lambda | |
resources: | |
Resources: | |
GatewayResponseDefault4XX: | |
Type: "AWS::ApiGateway::GatewayResponse" | |
Properties: | |
ResponseParameters: | |
gatewayresponse.header.Access-Control-Allow-Origin: "'*'" | |
gatewayresponse.header.Access-Control-Allow-Headers: "'*'" | |
gatewayresponse.header.Access-Control-Allow-Methods: "'*'" | |
ResponseType: DEFAULT_4XX | |
RestApiId: | |
Ref: "ApiGatewayRestApi" | |
provider: | |
name: aws | |
variablesResolutionMode: 20210326 | |
runtime: nodejs14.x | |
region: eu-west-1 | |
functions: | |
myAuther: | |
handler: authorizer/auther.handler | |
# ****************************** MY function ******************************************************* | |
mypuppeteer: | |
handler: handlers/myhandler.code | |
layers: | |
- arn:aws:lambda:eu-west-1:764866452798:layer:chrome-aws-lambda:25 | |
events: | |
- http: | |
path: myendpoint | |
method: POST | |
cors: true | |
authorizer: | |
name: myAuther | |
resultTtlInSeconds: 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment