Fugue.AWS.Lambda.Source

This is the preferred interface for making Lambda Sources with Fugue.

Module Members

arnSource

(Function)

arnSource Create an ARN Permission Source specifying an ARN.

Example usage:

import Fugue.AWS.Lambda as Lambda

sourceArn: Lambda.Source.arnSource {
  arn: "arn:aws:execute-api:region:0123456789012:/dev/foo/bar"
}

invokeFromApiGateway: Lambda.Permission.new {
  action: Lambda.InvokeFunction,
  principal: "apigateway.amazonaws.com",
  source: sourceArn,
}

Type Signature

 fun { arn: String} -> Source
Argument: arn

The ARN that the permission applies to.

Type: String

Returns:

A Fugue.Core.AWS.Lambda.Source value.

Type: Source

s3Bucket

(Function)

s3Bucket Create a Lambda Permission Source specifying an S3 Bucket.

Example usage:

import Fugue.AWS as AWS
import Fugue.AWS.Lambda as Lambda
import Fugue.AWS.S3 as S3

bucket: S3.Bucket.new {
  name: "example-bucket",
  region: AWS.Us-east-2,
}

sourceBucket: Lambda.Source.s3Bucket {
  bucket: bucket,
  account: "0123456789012",
},

invokeFromBucket: Lambda.Permission.new {
  action: Lambda.InvokeFunction,
  principal: "s3.amazonaws.com",
  source: sourceBucket,
}

Type Signature

 fun { bucket: Bucket,
       account: String} -> Source
Argument: bucket

The S3 source bucket for a permission.

Type: Bucket

Argument: account

The account number for the bucket.

Type: String

Returns:

A Fugue.Core.AWS.Lambda.Source value.

Type: Source

sesSource

(Function)

sesSource Create a Lambda Permission Source specifying an AWS account for SES.

Example usage:

import Fugue.AWS.Lambda as Lambda

sourceSES: Lambda.Source.sesSource {
  accountNumber: "0123456789012",
}

invokeFromSES: Lambda.Permission.new {
  action: Lambda.InvokeFunction,
  principal: "ses.amazonaws.com",
  source: sourceSES,
}

Type Signature

 fun { accountNumber: String} -> Source
Argument: accountNumber

The SES account number for a permission.

Type: String

Returns:

A Fugue.Core.AWS.Lambda.Source value.

Type: Source