Categories
AWS

AWS: SAM gotchas

If your lambda is just returning before expected, check the default Timeout in template.yaml, most likely you will need a bigger number there

Commands:

sam init

In case you don’t know where to start, that will walk you thru the process and download a sample app for ya

sam build

(pack the latest changes, it will rerun anything new you put in requirements.txt as well

sam local invoke “YourFunctionName” -e events/yourevent.json

run your function locally, with your own event

sam deploy

put it out there

Categories
redshift Uncategorized

Redshift: unable to connect newly created instance

Problem: you just created a new instance, and even though you told it to be publicly available, you can’t connect to it using the provided endpoint….

Solution: you need to explicitly add your current ip address to the security group you are using. Their default security group is miss-leading: even though it says it will accept all traffic from everywhere, it doesn’t (sad panda). Once you add a new security group and attach it to the redshift instance, you will be fine fine fine.

Source of the solution: the infamous stackoverflow:

https://stackoverflow.com/questions/19842720/cant-connect-to-redshift-database