-
Install Powershell 6.x on Mac
brew cask install powershell -
Install the .NET Core 2.1 SDK (not runtime)
-
Install the AWSLambdaPSCore module.
Install-Module AWSLambdaPSCore -Scope CurrentUser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name of our service | |
| service: daily-instance-snapshot | |
| # The required version of serverless we have to be using for this to work | |
| frameworkVersion: ">=1.26.0 <2.0.0" | |
| ############################## | |
| # Our service provider and runtime/region definitions | |
| ############################## | |
| provider: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env: | |
| VERSION: 0.1.${BUILDKITE_BUILD_NUMBER} | |
| steps: | |
| - label: ":docker: Build Powershell Lambda Environment" | |
| command: 'echo Building PS Docker Image...' | |
| agents: | |
| queue: myQueue | |
| plugins: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: "2010-09-09" | |
| Description: A Schedule to invoke a Lambda | |
| Parameters: | |
| LambdaArn: | |
| Type: String | |
| Description: ARN of the lambda to be invoked | |
| Resources: | |
| InvokeLambdaRole: | |
| Type: AWS::IAM::Role | |
| Properties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $lambda = 'test-ps-lambda' | |
| Install-Module -Name AWS.Tools.Installer, AWSLambdaPSCore | |
| Install-AWSToolsModule -Name Common, CloudWatchLogs, Lambda -Cleanup | |
| New-AWSPowerShellLambda -Template Basic -ScriptName TestLambda -Directory testlambda | |
| # Publish Lambda | |
| $publishParams = @{ | |
| ScriptPath = ".\TestLambda.ps1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM mcr.microsoft.com/powershell:6.2.3-alpine-3.8 | |
| RUN apk add --no-cache icu-libs | |
| ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | |
| LC_ALL=en_US.UTF-8 \ | |
| LANG=en_US.UTF-8 | |
| # Install .NET Core SDK | |
| ENV DOTNET_SDK_VERSION 2.1.803 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Module @{ModuleName="AWSPowerShell";ModuleVersion="3.3.450.0"} | |
| Write-Output -InputObject 'Delete all Default VPCs' | |
| $AllRegions = Get-EC2Region | |
| ForEach ($region in $AllRegions.RegionName) { | |
| Write-Output -InputObject "Searching $region" | |
| $defaultVpc = Get-EC2VPC -Filter @{name='isDefault'; Value='true'} -Region $region | |
| if ($defaultVpc) { | |
| Write-Output -InputObject "Found default VPC $($defaultVPC.VpcId) $($defaultVPC.CidrBlock) ... deleting" | |
| $VPCFilter = New-Object -TypeName Amazon.EC2.Model.Filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Ephemeral disk and swap setup script | |
| [Service] | |
| ExecStart=/usr/local/sbin/mount-instance-store.sh | |
| [Install] | |
| WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .Synopsis | |
| Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error. | |
| .Description | |
| Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error. | |
| .Parameter Exception | |
| The Exception that will be associated with the ErrorRecord. | |
An option for photos one has already uploaded in LRCC even after editing without loosing the non-destructive changes.
It's a nice work around, but I would prefer to have a re-naming function in LRCC of course.
Note that any image deleted from Lightroom CC shared on a web album with comments will lose the comments. In this case I put the comments into the description.
This idea was from Hans on the Photoshop Feedback site.