Skip to content

Instantly share code, notes, and snippets.

@dzmitry-kankalovich
Created May 16, 2021 15:58
Show Gist options
  • Save dzmitry-kankalovich/e82aef5acc573995026d388abc2a3e48 to your computer and use it in GitHub Desktop.
Save dzmitry-kankalovich/e82aef5acc573995026d388abc2a3e48 to your computer and use it in GitHub Desktop.
Notion RSS - Stack with Lambda
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