Simple Ikea stock alert function using AWS lambda and Serverless framework. It send
To easily deploy this service, we use Serverless framework. First install and configure it https://www.serverless.com/framework/docs/getting-started
git clone https://github.com/arkerone/serverless-ikea-stock-alert.git
cd serverless-ikea-stock-alert
npm install
Create the .env file :
cp .env.example .env
And set the environment variables :
QUEUE_ENDPOINT='' # The email which receive the alerts
REGION='' # The AWS region
SCHEDULE='cron(* */2 * * ? *)' # A schedule expressions for alert (more info : https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html)
PRODUCT_LIST='' # The list of products to check
LANGUAGE='en' # The language used for email ('en' or 'fr')
The list is in JSON format as follows :
{
"storeId":"198",
"city":"Reims",
"products":[
{
"id":"00263850",
"name":"BILLY, Bookcase, white, 80x28x202 cm"
},
{
"id":"20275814",
"name":"KALLAX, Shelving unit, white, 77x77 cm"
}
]
You can specify severals products if you want.
Refer to the following list : store list
Use the product reference that you can find on the internet or in stores
To deploy this lambda function, use this command :
serverless deploy
To remove this lambda function, use this command :
serverless remove