Skip to content

Commit

Permalink
feat: Add ability to pass architecture to Lambda function
Browse files Browse the repository at this point in the history
Closes #913
  • Loading branch information
eternity1984 committed Oct 29, 2024
1 parent 1ee9d5d commit a766469
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ export interface CertbotProps {
* @default Duraction.seconds(180)
*/
readonly timeout?: Duration;
/**
* The architecture for the Lambda function.
*
* This property allows you to specify the architecture type for your Lambda function.
* Supported values are 'x86_64' for the standard architecture and 'arm64' for the
* ARM architecture.
*
* @default lambda.Architecture.X86_64
*/
readonly architecture?: lambda.Architecture;
/**
* The schedule for the certificate check trigger.
*
Expand Down Expand Up @@ -254,6 +264,7 @@ export class Certbot extends Construct {
this.handler = new lambda.Function(this, 'handler', {
runtime: lambda.Runtime.PYTHON_3_10,
role,
architecture: props.architecture || lambda.Architecture.X86_64,
code: lambda.Code.fromAsset(functionDir, {
bundling: {
image: lambda.Runtime.PYTHON_3_10.bundlingImage,
Expand Down

0 comments on commit a766469

Please sign in to comment.