Created
May 16, 2021 15:58
-
-
Save dzmitry-kankalovich/e82aef5acc573995026d388abc2a3e48 to your computer and use it in GitHub Desktop.
Notion RSS - Stack with Lambda
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
import * as cdk from '@aws-cdk/core'; | |
import * as lambda from '@aws-cdk/aws-lambda'; | |
export class NotionRssFeedStack extends cdk.Stack { | |
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
// Create the RSS Feed Lambda function | |
const handler = new lambda.Function(this, 'NotionRssFeedHandler', { | |
runtime: lambda.Runtime.NODEJS_14_X, | |
code: lambda.Code.fromAsset('resources/lambda'), | |
handler: 'index.handler' | |
}); | |
// Print the ARN of the created Lambda | |
new cdk.CfnOutput(this, 'NotionRssFeedHandlerArn', { value: handler.functionName }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment