Closed Pigius closed 3 years ago
@pgrzesik extra modification to the PR, As the https://www.npmjs.com/package/serverless-lift, has a new release 1.1.1 which included the fix for the https://github.com/getlift/lift/issues/47. So I've updated:
lift
package to the newest oneserverless.yml
@Pigius Could you please share the link for diagram tool which you are used? It looks good 😊
@Pigius Could you please share the link for diagram tool which you are used? It looks good 😊
@o5 Hi, This is https://excalidraw.com/. It's free and open-source - it's brilliant! However, I recommend to always have a file with the .excalidraw
extension somewhere locally to be able to edit the diagram continuously, as in our IT reality everything changes quite often :)
@o5 Please also see https://libraries.excalidraw.com/?theme=light&sort=default#slobodan-aws-serverless as there are libraries with a great icons :)
@Pigius Thanks! I used https://asciiflow.com which resolves the frequent changes but result from excalidraw looks better :)
@o5 good to know, thanks!
Big picture behind
Currently, there aren't many examples of using the serverless approach with Ruby for AWS. Ruby is a great and mature language with a great community and lots of gems.
General message
This is an example of the usage of the
SQS
withDynamoDB
,API Gateway
, andAWS Lambda
functions, andCloudwatch
for monitoring. The service is for the purpose of creating lottery coupons for people. Each and every coupon consists of theid
,first_name
,last_name
andcoupon_value
as well as ofcreated_at
timestamp. API Gateway is triggering producing an SQS message, and then the consumer will create a record within the DynamoDB table. The incoming requests are validated with the usage ofdry-schema
.The diagram could be found here:
For the purpose of SQS part, the
Lift
construct was used, to allow usingAWS CDK
constructs functionalities.Extra points:
Last important point regarding the example: In the Lift, queue construct it is mentioned that we don't need to set up permission for the lambda. It's true, but if you will add extra IAM statements, it will not work anymore, and you need to manually add this to the
Serverless.yml
Update: I've raised the issue within the Lift repository. The issue is due to deprecated usage of
provider.iamRoleStatements
in Lift.