How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway

As of September 2017, you no longer have to configure mappings to access the request body. All you need to do is check, “Use Lambda Proxy integration”, under Integration Request, under the resource. You’ll then be able to access query parameters, path parameters and headers like so event[‘pathParameters’][‘param1’] event[“queryStringParameters”][‘queryparam1’] event[‘requestContext’][‘identity’][‘userAgent’] event[‘requestContext’][‘identity’][‘sourceIP’]

What is difference between Lightsail and EC2? [closed]

Testing¹ reveals that Lightsail instances in fact are EC2 instances, from the t2 class of burstable instances. EC2, of course, has many more instance families and classes other than the t2, almost all of which are more “powerful” (or better equipped for certain tasks) than these, but also much more expensive. But for meaningful comparisons, … Read more

What is the difference between Amazon SNS and Amazon SQS?

SNS is a distributed publish-subscribe system. Messages are pushed to subscribers as and when they are sent by publishers to SNS. SQS is distributed queuing system. Messages are not pushed to receivers. Receivers have to poll or pull messages from SQS. Messages can’t be received by multiple receivers at the same time. Any one receiver … Read more

“UNPROTECTED PRIVATE KEY FILE!” Error using SSH into Amazon EC2 Instance (AWS)

The problem is having wrong mod on the file. Easily solved by executing – chmod 400 mykey.pem Taken from AWS instructions – Your key file must not be publicly viewable for SSH to work. Use this command if needed: chmod 400 mykey.pem 400 protects it by making it read only and only for the owner.

Downloading an entire S3 bucket?

AWS CLI See the “AWS CLI Command Reference” for more information. AWS recently released their Command Line Tools, which work much like boto and can be installed using sudo easy_install awscli or sudo pip install awscli Once installed, you can then simply run: aws s3 sync s3://<source_bucket> <local_destination> For example: aws s3 sync s3://mybucket . … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)