Skip to content

Instantly share code, notes, and snippets.

View rcook's full-sized avatar

Richard Cook rcook

View GitHub Profile
@rcook
rcook / LICENSE
Last active August 8, 2023 00:27
AWS via Haskell (part 1): DynamoDB
The MIT License (MIT)
Copyright (c) 2017 Richard Cook
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@rcook
rcook / Main.hs
Last active December 18, 2017 18:38
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
module Main (main) where
import Control.Exception.Lens (handling)
import Control.Lens ((<&>), (^.), (.~), (&), set)
import Control.Monad.Trans.AWS
( AWST'
@rcook
rcook / AWSInfo.hs
Last active April 7, 2023 09:46
AWS via Haskell Part 2 (S3)
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
module AWSViaHaskell.AWSInfo
( AWSInfo(..)
, LoggingState(..)
, ServiceEndpoint(..)
, getAWSInfo
, withAWS
, withAWS'
@rcook
rcook / LICENSE
Last active March 30, 2020 05:46
AWS via Haskell Part 3 (SQS)
The MIT License (MIT)
Copyright (c) 2017 Richard Cook
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@rcook
rcook / AWSInfo.hs
Last active March 30, 2020 05:46
AWS via Haskell Part 4 (SimpleDB)
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
module AWSViaHaskell.AWSInfo
( AWSInfo(..)
, LoggingState(..)
, ServiceEndpoint(..)
, getAWSInfo
, withAWS
, withAWS'
@rcook
rcook / AWSService.hs
Last active May 23, 2022 09:14
AWS via Haskell Part 5 (Lambda)
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module AWSViaHaskell.AWSService
@rcook
rcook / EC2Imports.hs
Last active March 30, 2020 05:47
AWS via Haskell Part 6 (EC2)
module EC2Imports
( InstanceType(..)
, asgiGroupId
, asgiIPPermissions
, authorizeSecurityGroupIngress
, createSecurityGroup
, csgrsGroupId
, describeImages
, describeInstances
, describeInstanceStatus
@rcook
rcook / LICENSE
Last active March 30, 2020 05:47
AWS via Haskell: SSM
The MIT License (MIT)
Copyright (c) 2018 Richard Cook
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@rcook
rcook / LICENSE
Last active March 30, 2020 05:47
The MIT License (MIT)
Copyright (c) 2018 Richard Cook
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@rcook
rcook / LICENSE
Last active March 30, 2020 05:47
Haskell in AWS Lambda
The MIT License (MIT)
Copyright (c) 2018 Richard Cook
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions: