Skip to content

Commit

Permalink
Merge pull request #44 from RenovoSolutions/43-doesnt-work-on-arm
Browse files Browse the repository at this point in the history
fix: Can't support ARM architecture until bundling issues are resolved
  • Loading branch information
bmiller08 authored Oct 17, 2021
2 parents 2a325e2 + d1279c4 commit 557f9f3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 47 deletions.
12 changes: 0 additions & 12 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ The email to associate with the Let's Encrypt certificate request.

---

##### `architecture`<sup>Optional</sup> <a name="@renovosolutions/cdk-library-certbot.ICertbotProps.property.architecture"></a>

```typescript
public readonly architecture: Architecture;
```

- *Type:* [`@aws-cdk/aws-lambda.Architecture`](#@aws-cdk/aws-lambda.Architecture)

The architecture that Lambda will run on.

---

##### `bucket`<sup>Optional</sup> <a name="@renovosolutions/cdk-library-certbot.ICertbotProps.property.bucket"></a>

```typescript
Expand Down
Binary file modified function/function.zip
Binary file not shown.
36 changes: 1 addition & 35 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ export interface ICertbotProps {
* The timeout duration for Lambda function
*/
timeout?: cdk.Duration;
/**
* The architecture that Lambda will run on
*/
architecture?: lambda.Architecture;
/**
* The schedule for the certificate check trigger. Defaults to once every Sunday.
*/
Expand Down Expand Up @@ -107,7 +103,6 @@ export class Certbot extends cdk.Construct {

props.layers = (props.layers === undefined) ? [] : props.layers;
props.timeout = (props.timeout === undefined) ? cdk.Duration.seconds(180) : props.timeout;
props.architecture = (props.architecture === undefined) ? lambda.Architecture.X86_64 : props.architecture;
props.schedule = (props.schedule === undefined ) ? events.Schedule.cron({ minute: '0', hour: '0', weekDay: '1' }) : props.schedule;
props.runOnDeploy = (props.runOnDeploy === undefined ) ? true : props.runOnDeploy;
props.enableInsights = (props.enableInsights === undefined) ? false : props.enableInsights;
Expand Down Expand Up @@ -190,35 +185,7 @@ export class Certbot extends cdk.Construct {
this.handler = new lambda.Function(this, 'handler', {
runtime: lambda.Runtime.PYTHON_3_8,
role,
code: lambda.Code.fromAsset(functionDir + '/function.zip', {
// Not working with github actions
// bundling: {
// image: lambda.Runtime.PYTHON_3_8.bundlingImage,
// local: {
// tryBundle(outputDir: string) {
// try {
// execSync('pip3 --version | grep "python 3.8"');
// } catch {
// return false;
// }

// try {
// execSync(`pip install -r ${path.join(functionDir, 'requirements.txt')} -t ${path.join(outputDir)}`);
// } catch {
// return false;
// }

// try {
// execSync(`cp -au ${functionDir}/* ${path.join(outputDir)}`);
// } catch {
// return false;
// }

// return true;
// },
// },
// },
}),
code: lambda.Code.fromAsset(functionDir + '/function.zip'),
handler: 'index.handler',
environment: {
LETSENCRYPT_DOMAINS: props.letsencryptDomains,
Expand All @@ -231,7 +198,6 @@ export class Certbot extends cdk.Construct {
},
layers: props.layers,
timeout: props.timeout,
architecture: props.architecture,
});

new events.Rule(this, 'trigger', {
Expand Down

0 comments on commit 557f9f3

Please sign in to comment.