Brad  Hintz

Brad Hintz

1599277380

Introduction to AWS Lambda. Managing a contact form with Simple Email Service

The serverless approach to building applications is getting more and more popular. It might be appealing to write and deploy code without worrying about the infrastructure underneath.

Serverless computing still involves servers. The provider takes care of their maintenance entirely, though. We write event-driven functions that contain business logic. The provider charges us solely based on the compute time instead of a monthly fee.

The most mature Function as a service (FaaS) platform seems to be AWS Lambda. In this article, we explore its basics and some of the uses cases.

The basics of AWS Lambda

To create our first function, let’s go to the AWS Lambda dashboard and click on “Create function”. Let’s keep it simple for now.

AWS Lambda basic information

The first thing that we notice after creating our first function is the code editor.

We end up with a fundamental “Hello world” code. Let’s modify it a little bit:

AWS Lambda code

Above, you can see that we use the   event . name property. This is thanks to the fact that we can send JSON data along with our events.

Let’s create a test event and try out our function.

AWS Lambda test event

#aws #javascript #python

What is GEEK

Buddha Community

Introduction to AWS Lambda. Managing a contact form with Simple Email Service

Ajay Kapoor

1626759008

AWS Development Company | Amazon Web Development Services

PixelCrayons provides its clients with best-in-class AWS development services in India. They are backed by a team of 500+ professionals and help to reduce the operational overhead and risk of the organisations.

AWS development services aid in automating simple activities, such as to request change, monitoring, patch management, security, and backup services. Our services are efficient to provide the full-lifecycle services to establish, run, plus support IT infrastructure.

Overview of Our Amazon Web Services
PixelCrayons AWS Managed Services relieves you from infrastructure operations to provide direct access to resources toward distinguishing your business.

Ready to Get Started?
Stay ahead of competition with our professional, tailor-made & enterprise-grade Amazon Web Services. We provide you the right talent with right skills to the right business. Our professionals have expertise with modern technologies to address critical needs of global clients across industries.

Amazon web development services

#aws development services #aws development services in india #amazon web services #aws managed services #amazon web development services

First DigiAdd

1620022624

Best Email marketing strategy for Business to Reach Customer

A company can plan when to send time-based promotions or non-promotional emails using an email marketing strategy. With an email marketing strategy in place, marketers can plan out their email advertising process ahead of time.Top Email Marketing Platform

#creative email marketing services #email marketing #best email marketing services #top email marketing platform #email database & marketing services #email marketing service provider in pune

Luis  Rodrigues

Luis Rodrigues

1604162762

Sending Email using AWS Lambda and Amazon SES

In this article, we’ll discuss the procedure to build a Lambda function that will send an email to the specified recipient from the specified sender using Amazon Simple Email Service (SES). In this project, we’ll do everything in AWS console.

Before beginning, let’s understand some key concepts.

Amazon Simple Email Service (SES)

Amazon SES is an email platform that provides an easy, cost-effective way for us to send and receive email using our own email addresses and domains.

Using SES, we can send marketing emails such as special offers, transactional emails such as order confirmations, and other types of correspondence such as newsletters. When we use Amazon SES to receive mail, we can develop software solutions such as email autoresponders, email unsubscribe systems, and applications that generate customer support tickets from incoming emails.

Amazon SES eliminates infrastructure challenges such as email server management, network configuration etc.

#programming #nodejs #aws #aws-lambda #aws-simple-email-service

Christa  Stehr

Christa Stehr

1598408880

How To Unite AWS KMS with Serverless Application Model (SAM)

The Basics

AWS KMS is a Key Management Service that let you create Cryptographic keys that you can use to encrypt and decrypt data and also other keys. You can read more about it here.

Important points about Keys

Please note that the customer master keys(CMK) generated can only be used to encrypt small amount of data like passwords, RSA key. You can use AWS KMS CMKs to generate, encrypt, and decrypt data keys. However, AWS KMS does not store, manage, or track your data keys, or perform cryptographic operations with data keys.

You must use and manage data keys outside of AWS KMS. KMS API uses AWS KMS CMK in the encryption operations and they cannot accept more than 4 KB (4096 bytes) of data. To encrypt application data, use the server-side encryption features of an AWS service, or a client-side encryption library, such as the AWS Encryption SDK or the Amazon S3 encryption client.

Scenario

We want to create signup and login forms for a website.

Passwords should be encrypted and stored in DynamoDB database.

What do we need?

  1. KMS key to encrypt and decrypt data
  2. DynamoDB table to store password.
  3. Lambda functions & APIs to process Login and Sign up forms.
  4. Sign up/ Login forms in HTML.

Lets Implement it as Serverless Application Model (SAM)!

Lets first create the Key that we will use to encrypt and decrypt password.

KmsKey:
    Type: AWS::KMS::Key
    Properties: 
      Description: CMK for encrypting and decrypting
      KeyPolicy:
        Version: '2012-10-17'
        Id: key-default-1
        Statement:
        - Sid: Enable IAM User Permissions
          Effect: Allow
          Principal:
            AWS: !Sub arn:aws:iam::${AWS::AccountId}:root
          Action: kms:*
          Resource: '*'
        - Sid: Allow administration of the key
          Effect: Allow
          Principal:
            AWS: !Sub arn:aws:iam::${AWS::AccountId}:user/${KeyAdmin}
          Action:
          - kms:Create*
          - kms:Describe*
          - kms:Enable*
          - kms:List*
          - kms:Put*
          - kms:Update*
          - kms:Revoke*
          - kms:Disable*
          - kms:Get*
          - kms:Delete*
          - kms:ScheduleKeyDeletion
          - kms:CancelKeyDeletion
          Resource: '*'
        - Sid: Allow use of the key
          Effect: Allow
          Principal:
            AWS: !Sub arn:aws:iam::${AWS::AccountId}:user/${KeyUser}
          Action:
          - kms:DescribeKey
          - kms:Encrypt
          - kms:Decrypt
          - kms:ReEncrypt*
          - kms:GenerateDataKey
          - kms:GenerateDataKeyWithoutPlaintext
          Resource: '*'

The important thing in above snippet is the KeyPolicy. KMS requires a Key Administrator and Key User. As a best practice your Key Administrator and Key User should be 2 separate user in your Organisation. We are allowing all permissions to the root users.

So if your key Administrator leaves the organisation, the root user will be able to delete this key. As you can see **KeyAdmin **can manage the key but not use it and KeyUser can only use the key. ${KeyAdmin} and **${KeyUser} **are parameters in the SAM template.

You would be asked to provide values for these parameters during SAM Deploy.

#aws #serverless #aws-sam #aws-key-management-service #aws-certification #aws-api-gateway #tutorial-for-beginners #aws-blogs

Cache secrets using AWS Lambda extensions

What is the AWS Lambda extension?

A month back AWS announced a preview of Lambda Extensions, a new way to easily integrate Lambda with your favorite monitoring, observability, security, and governance tools. Extensions can be published as Lambda layers, there are two types are extension:

  • Internal extensions → Run as part of the runtime process, in-process with your code. Internal extensions enable use cases such as automatically instrumenting code.
  • External extensions → Allow you to run separate processes from the runtime but still within the same execution environment as the Lambda function. External extensions can start before the runtime process and can continue after the runtime shuts down. These extensions run as companion processes to Lambda functions.

#aws #aws-secrets-manager #lambda #aws lambda