Created
February 7, 2019 00:16
-
-
Save allenmichael/afbddc354ecfd99ccf3c54bfd1b2a71b to your computer and use it in GitHub Desktop.
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
Import-Module AWSLambdaPSCore | |
Import-Module AWSPowerShell.NetCore | |
$region = 'eu-west-2' | |
New-AWSPowerShellLambdaPackage -ScriptPath ./rek/DetectLabels.ps1 -OutputPackage DetectLabels.zip | |
Write-S3Object -BucketName amsxbg-dotnet-eu -File ./DetectLabels.zip | |
New-CFNStack -StackName DetectLabelsPS -Capabilities @("CAPABILITY_IAM","CAPABILITY_AUTO_EXPAND") -TemplateBody $(Get-Content ./serverless.template.json | Out-String) -Region $region | |
Wait-CFNStack -StackName DetectLabelPS | |
Get-CFNStack -StackName DetectLabelsPS -Region $region | Select-Object -ExpandProperty Outputs | Select-Object -Property @{Name='BucketName'; Expression={$_.OutputValue}} | Write-S3Object -File /Users/amsg/Documents/laser.jpg | |
Get-CFNStack -StackName DetectLabelsPS -Region $region | Select-Object -ExpandProperty Outputs | Select-Object -Property @{Name='BucketName'; Expression={$_.OutputValue}} | Get-S3ObjectTagSet -Key laser.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment