Serverless Stonks checker app for Wall Street Bets: week 3 activity report
A few weeks ago we set up an #API to monitor hot stocks via the Wall Street Bets subreddit. Since then we’ve seen quite a lot of activity in the app.
In this article, we’re showing you some interesting findings: https://dashbird.io/blog/serverless-stonks-checker-activity-report/
https://redd.it/nmutd9
@r_devops
A few weeks ago we set up an #API to monitor hot stocks via the Wall Street Bets subreddit. Since then we’ve seen quite a lot of activity in the app.
In this article, we’re showing you some interesting findings: https://dashbird.io/blog/serverless-stonks-checker-activity-report/
https://redd.it/nmutd9
@r_devops
Dashbird
Serverless Stonks checker for Wall Street Bets: week 3 activity report insights | Dashbird
A few weeks ago we set up a serverless Stonks checker API for Wall Street Bets. In this article, we will show you interesting findings around the API.
Submit a GET request to a REST API endpoint - Interact with web services - Ansible module uri
How to retrieve a JSON list of users via a GET request to a REST API web service HTTPS endpoint from a remote Linux host in a few lines of Ansible code.
[https://youtu.be/U92t0h9Cw8Q](https://youtu.be/U92t0h9Cw8Q)
---
# API https://reqres.in/api/users?page=2
- name: uri module demo
hosts: all
become: false
vars:
server: "https://reqres.in"
endpoint: "/api/users?page=2"
tasks:
- name: list users
ansible.builtin.uri:
url: "{{ server }}{{ endpoint }}"
method: GET
status_code: 200
timeout: 30
register: result
- name: debug
ansible.builtin.debug:
var: result.json.data
\#ansible #webservice #rest #api #uri #get
https://redd.it/rclrzd
@r_devops
How to retrieve a JSON list of users via a GET request to a REST API web service HTTPS endpoint from a remote Linux host in a few lines of Ansible code.
[https://youtu.be/U92t0h9Cw8Q](https://youtu.be/U92t0h9Cw8Q)
---
# API https://reqres.in/api/users?page=2
- name: uri module demo
hosts: all
become: false
vars:
server: "https://reqres.in"
endpoint: "/api/users?page=2"
tasks:
- name: list users
ansible.builtin.uri:
url: "{{ server }}{{ endpoint }}"
method: GET
status_code: 200
timeout: 30
register: result
- name: debug
ansible.builtin.debug:
var: result.json.data
\#ansible #webservice #rest #api #uri #get
https://redd.it/rclrzd
@r_devops
YouTube
Submit a GET request to a REST API endpoint - Interact with web services - Ansible module uri
How to retrieve a JSON list of users via a GET request to a REST API web service HTTPS endpoint from a remote Linux host in a few lines of Ansible code.
https://www.ansiblepilot.com/
Timestamps
Learn Ansible in course by 100+ examples:
https://courses.…
https://www.ansiblepilot.com/
Timestamps
Learn Ansible in course by 100+ examples:
https://courses.…
Running a Go Lambda with the provided.al2023 runtime
Hi all, I am struggling to get my Golang lambda function running with the new provided.al2023 runtime.
I am using the SAM CLI and the Hello World Template (the basics). I have updated the template.yaml to use the provided.al2023 runtime (I'm not sure why AWS toolkit doesn't do this by default now since the go1.x runtime is now deprecated). See below:
template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: >
test-go-lambda
Sample SAM Template for test-go-lambda
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 25
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: hello-world/
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x8664
Events:
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /hello
Method: GET
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
PARAM1: VALUE
Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generatedresources.rst#api
HelloWorldAPI:
Description: "API Gateway endpoint URL for Prod environment for First Function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
HelloWorldFunction:
Description: "First Lambda Function ARN"
Value: !GetAtt HelloWorldFunction.Arn
HelloWorldFunctionIamRole:
Description: "Implicit IAM Role created for Hello World function"
Value: !GetAtt HelloWorldFunctionRole.Arn
Now when i run sam build & then sam local start-api my request just hangs and then times out! Why is this?
Please note I am on a Windows system
https://redd.it/1j3z6go
@r_devops
Hi all, I am struggling to get my Golang lambda function running with the new provided.al2023 runtime.
I am using the SAM CLI and the Hello World Template (the basics). I have updated the template.yaml to use the provided.al2023 runtime (I'm not sure why AWS toolkit doesn't do this by default now since the go1.x runtime is now deprecated). See below:
template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: >
test-go-lambda
Sample SAM Template for test-go-lambda
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 25
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: hello-world/
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x8664
Events:
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /hello
Method: GET
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
PARAM1: VALUE
Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generatedresources.rst#api
HelloWorldAPI:
Description: "API Gateway endpoint URL for Prod environment for First Function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
HelloWorldFunction:
Description: "First Lambda Function ARN"
Value: !GetAtt HelloWorldFunction.Arn
HelloWorldFunctionIamRole:
Description: "Implicit IAM Role created for Hello World function"
Value: !GetAtt HelloWorldFunctionRole.Arn
Now when i run sam build & then sam local start-api my request just hangs and then times out! Why is this?
Please note I am on a Windows system
https://redd.it/1j3z6go
@r_devops
GitHub
serverless-application-model/docs/globals.rst at master · aws/serverless-application-model
The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates. - aws/serverless-application-model
Automating Jira releases from my CI/CD Pipeline
Hi!
I want to know if I'm on the right track with my idea. Here is my problem/status quo:
* BitBucket and Jira
* Software repo pipeline builds container images and updates GitOps repo with new image tags
* GitOps repo deploys container images to different production environments
* Software repo is integrated with Jira and development information is visible in Jira work items
* I have no information in Jira work items about the actual deployments
* Releases/Versions in Jira are created manually and someone has to set that version on the work items
* DORA metrics are wrong (especially change lead time)
My plan:
* Run semantic-release in my software repo pipeline
* Build container images and tag them with the version from semantic-release
* Run a script to create an unreleased version in Jira and update all work items with that version (fixVersions field) using the work item reference in the commit message
* Trigger a deployment pipeline in my GitOps repo that runs a script that:
* Get all work items for that release from the Jira API
* Use the [Jira Deployments API](https://developer.atlassian.com/cloud/jira/software/rest/api-group-deployments/#api-group-deployments) to add deployment information on work items
* Set the release in Jira as 'released' with the correct release date
* Have correct DORA metrics
* No manual interaction
* Release management in Jira is driven by my git versions
Has anyone done something like this? Are there better ways to do this? Good tools?
Thanks for reading this mess 😘
https://redd.it/1owcuiv
@r_devops
Hi!
I want to know if I'm on the right track with my idea. Here is my problem/status quo:
* BitBucket and Jira
* Software repo pipeline builds container images and updates GitOps repo with new image tags
* GitOps repo deploys container images to different production environments
* Software repo is integrated with Jira and development information is visible in Jira work items
* I have no information in Jira work items about the actual deployments
* Releases/Versions in Jira are created manually and someone has to set that version on the work items
* DORA metrics are wrong (especially change lead time)
My plan:
* Run semantic-release in my software repo pipeline
* Build container images and tag them with the version from semantic-release
* Run a script to create an unreleased version in Jira and update all work items with that version (fixVersions field) using the work item reference in the commit message
* Trigger a deployment pipeline in my GitOps repo that runs a script that:
* Get all work items for that release from the Jira API
* Use the [Jira Deployments API](https://developer.atlassian.com/cloud/jira/software/rest/api-group-deployments/#api-group-deployments) to add deployment information on work items
* Set the release in Jira as 'released' with the correct release date
* Have correct DORA metrics
* No manual interaction
* Release management in Jira is driven by my git versions
Has anyone done something like this? Are there better ways to do this? Good tools?
Thanks for reading this mess 😘
https://redd.it/1owcuiv
@r_devops