Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lambda): add cloudwatch lambda insights arm support #17665

Merged
merged 7 commits into from
Dec 13, 2021
Merged

feat(lambda): add cloudwatch lambda insights arm support #17665

merged 7 commits into from
Dec 13, 2021

Conversation

corymhall
Copy link
Contributor

@corymhall corymhall commented Nov 23, 2021

Adding builtin support for the new ARM64 CloudWatch insights Lambda
layers which were announced
yesterday.

also fixes #17133


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Adding builtin support for the new ARM64 CloudWatch insights Lambda
layers which were [announced](https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-cloudwatch-lambda-insights-functions-graviton2/)
yesterday.
@gitpod-io
Copy link

gitpod-io bot commented Nov 23, 2021

@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Nov 23, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 23, 2021
if (!versionExists) {
throw new Error(`Insights version ${insightsVersion} does not exist.`);
}

class InsightsVersion extends LambdaInsightsVersion {
public readonly layerVersionArn = Lazy.uncachedString({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it ok to just remove this? It will only be correct if you are using x86. Also not sure under what circumstances you would want to use this property. From what I can tell it is only used internally.

@corymhall corymhall requested a review from a team November 23, 2021 18:42
@nija-at nija-at assigned corymhall and unassigned nija-at Nov 30, 2021
@corymhall corymhall requested a review from rix0rrr November 30, 2021 16:30
@nija-at nija-at removed their assignment Dec 2, 2021
/**
* The system architectures compatible with this lambda function.
*/
readonly architecture?: Architecture;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we default this to X86?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the past it looks like we decided to intentionally not default this. See this comment and this comment

@@ -717,7 +719,7 @@ export class Function extends FunctionBase {
kmsKeyArn: props.environmentEncryption?.keyArn,
fileSystemConfigs,
codeSigningConfigArn: props.codeSigningConfig?.codeSigningConfigArn,
architectures: architecture ? [architecture.name] : undefined,
architectures: this._architecture ? [this._architecture.name] : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruh roh. Looks like we'll be able to have more than one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CloudFormation for some reason accepts a list with a max length of 1. We originally accepted a list, but then deprecated that in favor of a single value #16849.

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Dec 9, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Dec 9, 2021

Conditional approval after minor changes.

@corymhall corymhall removed the pr/do-not-merge This PR should not be merged at this time. label Dec 13, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 13, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: a8bf1b4
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 02749b4 into aws:master Dec 13, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 13, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Adding builtin support for the new ARM64 CloudWatch insights Lambda
layers which were [announced](https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-cloudwatch-lambda-insights-functions-graviton2/)
yesterday.

also fixes aws#17133

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(lambda): Specifying insightsVersion triggers warning to make lazy
4 participants