AWS serverless documentation Authorization Using API Gateway blog Iam Role Events handled by CreateSocket labmda: Connect Do Not Message the
Month: September 2023
API Gateway vs ALB to invoke lambda
AWS API Gateway vs. Application Load Balancer (ALB)
Step Function and Cloudwatch Log
https://www.davehall.com.au/blog/2020/07/10/logging-step-functions-cloudwatch/ AWSTemplateFormatVersion: ‘2010-09-09’ Description: StepFunction with Logging Example. Parameters: Resources: StepFunctionExecRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: ‘2012-10-17’ Statement: – Effect:
Timestamp and Timezone
https://stackoverflow.com/questions/38077862/how-to-tell-javascript-date-where-to-take-timezoneoffset-from The definition of UNIX timestamp is time zone independent. The UNIX timestamp is the number of seconds (or milliseconds)
IndexedDB
Shortfall of local storage – Only store string data in localStorage, which are susceptible to XSS attacks, and it does
Lambda Cache
https://katiyarvipinknp.medium.com/how-to-cache-the-data-in-aws-lambda-function-using-node-js-use-tmp-storage-of-aws-lambda-2c7e1e01d923 const cachedItem = {}; // as you know, anything declared outside the event handler function is reused between invocations.
SQS subscribes to SNS topic
Resources: SNSTopic: Type: AWS::SNS::Topic Properties: TopicName: name KmsMasterKeyId: !ImportValue kms-key-id SQSQueue: Type: AWS::SQS::Queue SNSSubscription: Type: AWS::SNS::Subscription Properties: TopicArn: !Ref SNSTopicArn
Step function notes
Use step function to delay sns { “StartAt”: “Delay”, “Comment”: “Publish to SNS with delay”, “States”: { “Delay”: { “Type”: