I have two different AWS Lambda functions that need to share some common data. (via a datastore kind of thing).
How to achieve this with AWS Lambda ?
On top of what rowan said, you might want to look into step functions.
Data stores used in serverless/Lambda applications are the same as any other application. The store that you choose will probably depend more on the data and the way you intend to use it than the fact that it's being accessed by Lambda - at the end of the day a client is a client, regardless of if it's serverless or not.
Some popular options for Lambda-based applications are:
DyanmoDB: Amazon's key/value store (i.e. it's NOT a relational database, so don't treat it like that) which is nice because it is also serverless - you just provision your table, and that's it.
S3: Amazon's object store, which can be used like a database in a surprising number of situations. Just remember that it is not a database, and is more of a key/value store (with different performance characteristics to DDB).
RDS: Amazon's MySQL/PgSql/MSSQL/etc service. RDS works well when you want/know/love relational databases, especially since it can easily be run with cross-AZ redundancy (meaning an outage won't affect your database or your serverless application). Note that your Lambda functions will need to be VPC-based in order to securely access your RDS instance.
AWS and JS
Ant Stanley
Digital. They have digital. What is digital? And it’s very complicated, you have to be Albert Einstein to figure it out.
It really depends on your use case. Is it state data, or configuration data?
For configuration data (secrets, db login credentials, etc), the recommended way is EC2 Parameter Store, which Lambda functions can access (Lambda is built on top of EC2). It's also integrated with KMS so you can store config data securely. These are some good posts on how to use it. medium.com/@mda590/simple-secrets-management-via-…
hackernoon.com/you-should-use-ssm-parameter-store…
If you're using it for state data, then there are loads of options as other people have mentioned below. I would look at one of Step Functions, DynamoDB or S3. When deciding what to use you should ask yourself how unique is the data that needs to be shared, and what is the rate of change of that data. If the data is not very unique and doesn't change much, then use S3, if it's very unique and is very likely to change something like Step Functions will be better. Basically it comes down to the performance characteristics of those services.
The other option is using a queuing mechanism to pass data between functions, but that depends on the logic of your application, and is most applicable when you have a chain of functions invoked from an event. This is a good post on comparing the different queues AWS has hackernoon.com/applying-the-pub-sub-and-push-pull…