During the Software Craftsmanship and Testing conference UK, Mash run a session on AWS Lambda, with examples written in Java and python. Some other people also tried to do it in NodeJS. This session is here
The first part, mostly accidental complexity, is how to setup the account to be able to use these services. This is the part that most people struggled with, so here is a step-by-step guide.
Connect to the AWS Console
Click on your name (top right), then 'My Account'
On the left menu, click 'Payment Methods'
Add a debit/credit card. This is very important, as you could go over the free tier and they would need to charge you. But with the levels of activity that we'll be using, you are included in the free tier
Connect to the AWS Console
Go to Services, choose IAM
Create a 'group', to hold these users and policies
Click 'Create a new group'
Pick a name for the group
Click next, choose these policies:
Next. See this page:
Click Create group
Find your new group
Click on 'Users' tab. It won't have any users, as you just created it.
Create new users: go to the menu on the left 'Users', click the button 'Create new users'
You need to generate as many users as you want. For a test, with one is enough. Pick a name for those users. In my case, 'test1' 'and test2'. Select 'Generate an access key for each user'
Click 'Show User Security Credentials', to see the credentials. You'll use those to authenticate against AWS.
In any case, it's better to download the credentials
A CSV with the tokens
Go to Groups, again
Click 'users' tab, then 'Add users to this group'
Find or filter the users that you want
Select them
Click 'Add Users'
Configure it, with this help page
$ aws configure
AWS Access Key ID [****************TEST]: ##$YOUR_ACCESS_KEY##
AWS Secret Access Key [****************TEST]: ##$YOUR_SECRET_ACCES_KEY##
Default region name [eu-west-1]: eu-west-1 #or any other zone
Default output format [None]: #just type enter
Check that the CLI is correctly configured:
$ aws lambda list-functions
{
"Functions": []
}
You can use the services. The series continue at the next post
Software is our passion.
We are software craftspeople. We build well-crafted software for our clients, we help developers to get better at their craft through training, coaching and mentoring, and we help companies get better at delivering software.