神刀安全网

Configuring Amazon Web Services (AWS) for using Lambda

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 ishere

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.

Setting up your payment method

  1. Connect to the AWS Console

    Configuring Amazon Web Services (AWS) for using Lambda

  2. Click on your name (top right), then ‘My Account’

    Configuring Amazon Web Services (AWS) for using Lambda

  3. On the left menu, click ‘Payment Methods’

    Configuring Amazon Web Services (AWS) for using Lambda

  4. 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

    Configuring Amazon Web Services (AWS) for using Lambda

Setting up your AWS account

  1. Connect to the AWS Console

    Configuring Amazon Web Services (AWS) for using Lambda

  2. Go to Services, choose IAM

    Configuring Amazon Web Services (AWS) for using Lambda

  3. Create a ‘group’, to hold these users and policies

    Configuring Amazon Web Services (AWS) for using Lambda

  4. Click ‘Create a new group’

    Configuring Amazon Web Services (AWS) for using Lambda

  5. Pick a name for the group

    Configuring Amazon Web Services (AWS) for using Lambda

  6. Click next, choose these policies:

    • AWSLambdaFullAccess
    • IAMFullAccess
    • AmazonAPIGatewayAdministrator

    Configuring Amazon Web Services (AWS) for using Lambda

  7. Next. See this page:

    Configuring Amazon Web Services (AWS) for using Lambda

  8. Click Create group

    Configuring Amazon Web Services (AWS) for using Lambda

  9. Find your new group

    Configuring Amazon Web Services (AWS) for using Lambda

  10. Click on ‘Users’ tab. It won’t have any users, as you just created it.

    Configuring Amazon Web Services (AWS) for using Lambda

  11. Create new users: go to the menu on the left ‘Users’, click the button ‘Create new users’

    Configuring Amazon Web Services (AWS) for using Lambda

  12. 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’

    Configuring Amazon Web Services (AWS) for using Lambda

  13. Click ‘Show User Security Credentials’, to see the credentials. You’ll use those to authenticate against AWS.

    Configuring Amazon Web Services (AWS) for using Lambda

  14. In any case, it’s better to download the credentials

    Configuring Amazon Web Services (AWS) for using Lambda

  15. A CSV with the tokens

    Configuring Amazon Web Services (AWS) for using Lambda

  16. Go to Groups, again

    Configuring Amazon Web Services (AWS) for using Lambda

  17. Click ‘users’ tab, then ‘Add users to this group’

    Configuring Amazon Web Services (AWS) for using Lambda

  18. Find or filter the users that you want

    Configuring Amazon Web Services (AWS) for using Lambda

  19. Select them

    Configuring Amazon Web Services (AWS) for using Lambda

  20. Click ‘Add Users’

    Configuring Amazon Web Services (AWS) for using Lambda

Installing and configuring the AWS CLI

  1. Find the installer at AWS CLI
  2. Configure it, with this help page

    • A sample of that
    $ 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 
  3. Check that the CLI is correctly configured:

    $ aws lambda list-functions {     "Functions": [] } 
  4. You can use the services. The series continue at thenext post

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Configuring Amazon Web Services (AWS) for using Lambda

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址