Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

adds sam.yaml for publishing to SAR #17

Closed
wants to merge 1 commit into from

Conversation

brianleroux
Copy link
Contributor

Here's the SAM needed to upload to SAR! I just used the console to create it…literally uploading that file manually. (You'll need to change the S3 bucket in the file to point to one that you control (and that is public).

To automate looks like you'll need to write a script (ironically SAR is not supported by CloudFormation yet). But should be fairly straightforward. If you don't beat me to it will look at making into a Github Action. Also LMK when you get it publishing and I'll remove mine from the SAR so we don't have dueling runtimes!

@brianleroux
Copy link
Contributor Author

haha, ok this is funny but you CAN deploy with CloudFormation using SAM extension https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-application.html

Copy link
Contributor

@hayd hayd left a comment

Choose a reason for hiding this comment

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

Fantastic, thank you!

Do you have the CLI command(s) you used to do the upload / publish?

It might take a week, or two, for me to have time to wire this up. But this is really useful.


It'd also be great to have a SAM example in the examples, so I will check out the repos you created.
(Edit: and I'll link to arc too)

Let me know if you have any other feedback (specifically if you have an example that uses lots of memory or behaves badly in some other way, the hope is that the runtime should always error cleanly - with a nice message - otherwise it's a bug). It may be this...

Example custom runtime for Deno

Resources:
DenoRuntime:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think this would make sense to be called simply "Deno" ? or is it important it's suffixed with Runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doesn't really matter / just a clarity thing / end user probably won't see it

Copy link
Contributor

Choose a reason for hiding this comment

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

In serverless it's very fussy about being called DenoLambdaLayer.

Properties:
Content:
S3Bucket: begin-public-east-1
S3Key: deno-runtime.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this deno-lambda-layer.zip ?

Copy link
Contributor

Choose a reason for hiding this comment

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

It may be the s3 thing is not required (and can use ContentUri): https://serverless.pub/sar-layers/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this deno-lambda-layer.zip ?

yes

It may be the s3 thing is not required (and can use ContentUri): https://serverless.pub/sar-layers/

maybe! seems the docs are pretty thin and maybe in flux; typical aws! =P

Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't work without s3! AWS docs seem very thin :)

@hayd
Copy link
Contributor

hayd commented Jan 3, 2020

Sorry for the delay, will ship this next week.

@hayd
Copy link
Contributor

hayd commented Jan 12, 2020

I've published to here: https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:390065572566:applications~deno

Happy to take feedback @brianleroux ! Does it look correct?
The user experience is a little weird (it seems like you can maybe add a Test App?)

ps. how did you get verified by AWS??

@hayd
Copy link
Contributor

hayd commented Jan 12, 2020

Sigh, looks like I broke something in my last step. It's disappeared from SAR now!
Confusing, something seems fragile which is a little worrying.

@hayd
Copy link
Contributor

hayd commented Jan 13, 2020

merged in #27. Thanks!

@hayd hayd closed this Jan 13, 2020
@hayd
Copy link
Contributor

hayd commented Jan 14, 2020

It's tempting to make lower case deno rather than Deno which seems to be the convention for application name in SAR.
What do you think?

@brianleroux
Copy link
Contributor Author

The user experience is SO WEIRD. LOL. I got verified because of the open source work I've done w arc.codes and serverlessness in general. I can def put in a good word for you. Maybe hit me up via email? brian@begin.com and I can relay to the right AWS folk.

Haven't taken the release for a spin yet but will do 🔜 !

@hayd
Copy link
Contributor

hayd commented Jan 16, 2020

The user experience is SO WEIRD. LOL.

💯

I dropped you an email.

I've added and verified the example-sam and example-serverless directories work so hopefully yours will to... 🤞

hayd added a commit that referenced this pull request Jan 25, 2020
Specifically console.log will always be one cloudwatch log event
Fixes #17.
@hayd
Copy link
Contributor

hayd commented Jan 28, 2020

I submitted to get verified status and was accepted (it takes a few days to process/go live).

https://docs.aws.amazon.com/serverlessrepo/latest/devguide/serverlessrepo-verified-author.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants