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

New Serverless Pattern: fargate-eventbridge-serverless #1588

Conversation

notanmay
Copy link
Contributor

Description of changes:
Creates a new serverless framework pattern to deploy a scheduled AWS Fargate task running on AWS ECS Cluster.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@notanmay notanmay changed the title feat: ✨ fargate-eventbridge-serverless pattern New Serverless Pattern: fargate-eventbridge-serverless Aug 23, 2023
@@ -0,0 +1,82 @@
# Leveraging Fargate for Scheduled Jobs

This pattern contains a sample cloudformation template to deploy a scheduled AWS Fargate task using EventBridge running on an Amazon Elastic Container Service (ECS) cluster. The docker image is pushed to Amazon Elastic Container Registry (ECR) using cloudformation template without having to pre-push the image to ECR or another container library. The serverless framework plugin for fargate, `serverless-fargate` is used to deploy tasks on ECS Cluster. This task runs every 10th minute of the hour and a simple file containing JSON is put in S3 bucket.
Copy link
Contributor

Choose a reason for hiding this comment

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

CloudFormation.
I think it would be worth to mention that this is using serverless framework early on, as you are putting this as a CloudFormation template, and it is inside a SF one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you using EventBridge Scheduler for this?

Copy link
Contributor Author

@notanmay notanmay Aug 31, 2023

Choose a reason for hiding this comment

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

Thanks for the review, this pattern is using Eventbridge Rule to schedule the task.

1. Change directory to the fargate-eventbridge pattern directory:

``` sh
cd serverless-patterns/fargate-eventbridge-serverless
Copy link
Contributor

Choose a reason for hiding this comment

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

cd fargate-ev....


1. Open Docker Desktop and keep it running in the background.

1. From the command line, use Serverless Framework to deploy the AWS resources for the pattern as specified in the serverless.yml file:
Copy link
Contributor

Choose a reason for hiding this comment

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

need to install serverless-fargate before running this. Please add to the instructions

@mavi888
Copy link
Contributor

mavi888 commented Aug 28, 2023

Please fix the above comments and I will come back to this pattern next week.

@notanmay
Copy link
Contributor Author

notanmay commented Sep 3, 2023

Thanks for reviewing the pattern, I have updated the documentation according to your review.

@mavi888 mavi888 merged commit 64e186f into aws-samples:main Sep 4, 2023
2 checks passed
@mavi888
Copy link
Contributor

mavi888 commented Sep 5, 2023

Thanks for submitting this pattern.
Now it's live in Serverless Land: https://serverlessland.com/patterns/fargate-eventbridge-serverless

Cheers

@KillDozerX2 KillDozerX2 deleted the notanmay-feature-fargate-eventbridge-serverless branch September 8, 2023 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants