Friday, January 29, 2021
AWS Lambda Layers
Friday, January 1, 2021
Tuesday, December 29, 2020
AWS CloudShell
AWS CloudShell is a browser-based shell that makes it easy to securely manage, explore, and interact with your AWS resources. CloudShell is pre-authenticated with your console credentials. Common development and operations tools are pre-installed, so no local installation or configuration is required. With CloudShell, you can quickly run scripts with the AWS Command Line Interface (AWS CLI), experiment with AWS service APIs using the AWS SDKs, or use a range of other tools to be productive. You can use CloudShell right from your browser and at no additional cost.
Benefits
No extra credentials to manage
CloudShell inherits the credentials of the user signed in to the AWS Management Console, so there's no need to spend extra effort managing credentials locally.
Always up to date
CloudShell provides a fully managed Amazon Linux 2 environment that has the latest versions of popular tools already installed and updated. You don't need to patch the environment or update the pre-installed tools.
No cost
CloudShell provides you with a browser-based shell to run scripts and commands. It includes 1 GB of persistent storage per Region at no extra cost to you. You only pay for the AWS resources you use with CloudShell to create and run your applications.
Customizable
With 1 GB of persistent storage per Region, you can store scripts, files, configuration preferences, and additional tools in your home directory. You can begin working immediately, without customizing your environment every time you use the shell.
Monday, November 2, 2020
Snowflake - Tasks
User-defined tasks allow scheduled execution of SQL statements. Tasks run according to a specified execution configuration, using any combination of a set interval and/or a flexible schedule using a subset of familiar cron utility syntax. Tasks currently run in user-specified warehouses but will eventually run in a serverless environment using Snowflake-supplied compute resources. Currently, a task can execute a single SQL statement, including a call to a stored procedure. Tasks can be combined with table streams for continuous ELT workflows to process recently changed table rows. Streams ensure exactly once semantics for new or changed data in a table. Tasks can also be used independently to generate periodic reports by inserting or merging rows into a report table or perform other periodic work.
Task Scheduling
There is no event source that can trigger a task; instead, a task runs on a schedule, which can be defined when creating a task (using CREATE TASK) or later (using ALTER TASK). Snowflake ensures only one instance of a task with a schedule (i.e. a standalone task or the root task in a tree of tasks) is executed at a given time. If a task is still running when the next scheduled execution time occurs, then that scheduled time is skipped.
Task History
Query the TASK_HISTORY table function to verify the task did not run. It is possible that the task ran successfully but the SQL statement in the task definition failed. In particular, note the scheduled and completed times, as well as any error code and message. If the task has a parent task (in a tree of tasks), verify whether the parent task completed successfully.
There is a 60 minute default limit on a single run of a task. This limitation was implemented as a safeguard against non-terminating tasks.
Link: https://docs.snowflake.com/en/user-guide/tasks-intro.html
Monday, October 26, 2020
Snowflake - Stored Procedures
- JavaScript provides the control structures (branching and looping).
- SQL is executed by calling functions in a JavaScript API.
- Procedural logic (branching and looping), which straight SQL does not support.
- Error handling.
- Dynamically creating a SQL statement and execute it.
- Writing code that executes with the privileges of the role that owns the procedure, rather than with the privileges of the role that runs the procedure. This allows the stored procedure owner to delegate the power to perform specified operations to users who otherwise could not do so. However, there are limitations on these owner’s rights stored procedures.
Tuesday, June 2, 2020
Multi-tenant Application
Wednesday, February 26, 2020
ASP.NET Core Middleware
- Chooses whether to pass the request to the next component in the pipeline.
- Can perform work before and after the next component in the pipeline.
