Simple EPG generator (at this time it only can parse tv guides from tv24.lt website) which runs on AWS (Amazon web services) lambda. Infrastructure are deployable trough serverless framework.
Serverless Framework enables you to seemlessly deploy applications to AWS. However, this does require AWS Credentials to do so. There are a few ways to supply your credentials, preferred approach it to use the AWS CLI to configure details.
In order to use Serverless on AWS you will need an AWS Account. If you don’t already have one, you can sign up for a free trial that includes 1 million free AWS Lambda requests per month.
-
For detailed information of the aws configure check out the Configuring the AWS CLI
-
Install global serverless dependencies:
npm install -g serverless
-
Clone repository and go to downloaded directory.
-
Rename
env.configs.yml.example
file toenv.configs.yml
and fill it wit values:
# Targeted deployment stage (you can leave at it is)
stage: prod
# Targeted aws region (you can leave at it is)
region: eu-central-1
# Bucket name (Bucket will be created in deployment step. Pick a unique name. Only lowercase allowed)
bucket: my-custom-epg-bucket-name
# Generated EPG file name
filename: Guide.xml
# Your IPv4 address. You can find it here: https://whatismyipaddress.com/
customerExternalIpAddress: 111.111.11.11
- Build application.
For Unix use command:
./build.sh
For Windows:
build.cmd
- Deploy epg generator service to AWS.
sls deploy
- Invoke epg generator service for the first time (This step only needed for the first time, later script will run automaticly at 02:00 AM) with command:
sls invoke -f epgGenerator
- Check if epg generator run succesfully:
sls logs -f epgGenerator
You should look for output something like:
START RequestId: 2f5c6c14-379d-4a46-8311-240c5ca62423 Version: $LATEST
RunTime 00:00:34.65
END RequestId: 2f5c6c14-379d-4a46-8311-240c5ca62423
REPORT RequestId: 2f5c6c14-379d-4a46-8311-240c5ca62423 Duration: 35410.07 ms Billed Duration: 35500 ms Memory Size: 1024 MB Max Memory Used: 204 MB
At this time you succesfully deployed service to AWS
Login to your AWS account. Go to S3 service and look for your bucket (you should look for a bucket with name you wrote in environment file).