Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save taufiqibrahim/5ab106ae1dce897655107d7c69274eeb to your computer and use it in GitHub Desktop.
Save taufiqibrahim/5ab106ae1dce897655107d7c69274eeb to your computer and use it in GitHub Desktop.
$ serverless print --stage dev
service:
name: demo-walkthrough
frameworkVersion: '2'
provider:
stage: dev
region: ap-southeast-1
name: aws
runtime: python3.8
environment:
AWS_S3_DEPLOYMENT_BUCKET: <CREDENTIALS_OMITTED>
AWS_LAMBDA_EXECUTION_ROLE: arn:aws:iam::<ACCOUNT_ID>:role/AWSLambdaMSKDemoWalkthroughRole
AWS_LAMBDA_EXECUTION_TIMEOUT: '300'
AWS_LAMBDA_MSK_BATCH_SIZE: '1000'
AWS_VPC_SECURITY_GROUP_ID_1: sg-<CREDENTIALS_OMITTED>
AWS_VPC_SUBNET_ID_1: subnet-<CREDENTIALS_OMITTED>
AWS_VPC_SUBNET_ID_2: subnet-<CREDENTIALS_OMITTED>
AWS_MSK_CLUSTER_1: arn:aws:kafka:ap-southeast-1:<CREDENTIALS_OMITTED>
AWS_MSK_BOOTSTRAP_SERVERS_1: <CREDENTIALS_OMITTED>
AWS_MSK_CLUSTER_2: <AWS_MSK_CLUSTER_1_ARN>
AWS_MSK_BOOTSTRAP_SERVERS_2: <AWS_MSK_BOOTSTRAP_SERVERS_1_URLS>
KAFKA_STARTING_POSITION: LATEST
ORDERS_TOPIC: demo-walkthrough-orders
SCHEMA_REGISTRY_URL: http://<CREDENTIALS_OMITTED>:8081
MYSQL_CONN_STRING: mysql+pymysql://<CREDENTIALS_OMITTED>:3306/demo
profile: serverless
memorySize: 1024
timeout: 300
logRetentionInDays: 14
deploymentBucket: <CREDENTIALS_OMITTED>
iam:
role: arn:aws:iam::<ACCOUNT_ID>:role/AWSLambdaMSKDemoWalkthroughRole
lambdaHashingVersion: '20201221'
vpc:
securityGroupIds:
- sg-<CREDENTIALS_OMITTED>
subnetIds:
- subnet-<CREDENTIALS_OMITTED>
versionFunctions: true
variableSyntax: \${([^{}:]+?(?:\(|:)(?:[^:{}][^{}]*?)?)}
custom:
startingPosition: LATEST
pythonRequirements:
dockerizePip: non-linux
slim: true
plugins:
- serverless-python-requirements
functions:
p01OrdersEnrichCustomerLocation:
handler: p01OrdersEnrichCustomerLocation.main
events:
- msk:
arn: arn:aws:kafka:ap-southeast-1:<CREDENTIALS_OMITTED>
topic: demo-walkthrough-orders
batchSize: 1000
startingPosition: LATEST
enabled: true
environment:
SERVICE: demo-walkthrough-dev-p01OrdersEnrichCustomerLocation
TOPIC_IN: demo-walkthrough-orders
TOPIC_OUT: demo-walkthrough-p01OrdersEnrichCustomerLocation
KAFKA_BOOTSTRAP_SERVERS_READ: <CREDENTIALS_OMITTED>
KAFKA_BOOTSTRAP_SERVERS_WRITE: <CREDENTIALS_OMITTED>
package: {}
name: demo-walkthrough-dev-p01OrdersEnrichCustomerLocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment