Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssetCodeGo ¶
AssetCodeGo bundles lambda function from source code
func NewFunctionGo ¶
func NewFunctionGo(scope constructs.Construct, id *string, spec *FunctionGoProps) awslambda.Function
NewFunctionGo creates Golang Lambda Function from "inline" code
Types ¶
type AuthorizerIAM ¶ added in v0.8.0
type AuthorizerIAM struct { constructs.Construct RestAPI apigw2.HttpApi // contains filtered or unexported fields }
func (*AuthorizerIAM) AddResource ¶ added in v0.8.0
func (api *AuthorizerIAM) AddResource( endpoint string, handler awslambda.Function, grantee awsiam.IGrantable, ) *AuthorizerIAM
Associate a Lambda function with a REST API path. It uses the specified path as a prefix, enabling the association of the Lambda function with all subpaths under that prefix.
Protect access to resource only for AWS IAM principals.
type AuthorizerJwt ¶ added in v0.8.0
type AuthorizerJwt struct { constructs.Construct RestAPI apigw2.HttpApi // contains filtered or unexported fields }
func (*AuthorizerJwt) AddResource ¶ added in v0.8.0
func (api *AuthorizerJwt) AddResource( endpoint string, handler awslambda.Function, accessScope ...string, ) *AuthorizerJwt
Associate a Lambda function with a REST API path. It uses the specified path as a prefix, enabling the association of the Lambda function with all subpaths under that prefix.
Protect access to resource only for principals with valid JWT token.
type FunctionGoProps ¶
type FunctionGoProps struct { *awslambda.FunctionProps SourceCodeModule string SourceCodeLambda string GoEnv map[string]string GoVar map[string]string }
FunctionGoProps is properties of the function
type Gateway ¶
type Gateway struct { constructs.Construct RestAPI apigw2.HttpApi // contains filtered or unexported fields }
func NewGateway ¶
func NewGateway(scope constructs.Construct, id *string, props *GatewayProps) *Gateway
NewGateway creates new instance of Gateway
func (*Gateway) AddResource ¶
Associate a Lambda function with a REST API path. It uses the specified path as a prefix, enabling the association of the Lambda function with all subpaths under that prefix.
func (*Gateway) NewAuthorizerCognito ¶ added in v0.8.0
func (gw *Gateway) NewAuthorizerCognito(cognitoArn string) *AuthorizerJwt
Creates integration with AWS Cognito to authorize incoming requests. This integration allows you to manage user authentication and authorization seamlessly. By utilizing AWS Cognito, you can implement robust user sign-up, sign-in, and access control mechanisms. The library ensures that only authenticated users with valid tokens can access your API endpoints, providing an additional layer of security and user management capabilities.
func (*Gateway) NewAuthorizerIAM ¶ added in v0.8.0
func (gw *Gateway) NewAuthorizerIAM() *AuthorizerIAM
Creates integration with AWS IAM to authorize incoming requests. This integration ensures that only authenticated and authorized principals can access the resources and functionalities provided by your Lambda functions. By leveraging AWS IAM policies and roles, the library enforces fine-grained access control, enhancing the security of your API endpoints.
func (*Gateway) NewAuthorizerJwt ¶ added in v0.8.0
func (gw *Gateway) NewAuthorizerJwt(iss string, aud ...string) *AuthorizerJwt
Creates integration with Single Sign On provider (e.g. Auth0) to authorize incoming requests using JWT tokens. This integration allows you to leverage external identity providers for user authentication, ensuring secure and seamless access to your API endpoints. By validating JWT tokens issued by the SSO provider, the library ensures that only authenticated users can access your resources. Additionally, this setup can support various SSO standards and providers, enhancing flexibility and security in managing user identities and permissions.
type GatewayProps ¶ added in v0.7.0
type GatewayProps struct { *apigw2.HttpApiProps Host *string TlsArn *string }
type GoCompiler ¶ added in v0.6.0
type GoCompiler struct {
// contains filtered or unexported fields
}
func NewGoCompiler ¶ added in v0.6.0
func (*GoCompiler) SourceCodeLambda ¶ added in v0.6.0
func (g *GoCompiler) SourceCodeLambda() string
func (*GoCompiler) SourceCodePackage ¶ added in v0.6.0
func (g *GoCompiler) SourceCodePackage() string
func (*GoCompiler) TryBundle ¶ added in v0.6.0
func (g *GoCompiler) TryBundle(outputDir *string, options *awscdk.BundlingOptions) *bool