id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_35_0.txt
$splitSelect = $wordToComplete -Split '\\.' $splitSelect | Select-Object -First ( $splitSelect . Length \- 1 ) | ForEach-Object { $propertyName = $_ $properties = $type . GetProperties ( ( 'Instance' , 'Public' , 'DeclaredOnly' ) ) | Where-Object { $_ . Name -ieq $propertyName } i...
aws_legacy_credentials_and_S3/powershelllambdacode_24_0.txt
** Tools for PowerShell **
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_43_0.txt
# wkKVpYBzQHDSnlZUXKnE0kEGj8kz/E1FkVyBn+0snPgWWd+etSQVwpi5tHdJ3InE # Ctqvy15r7a2wcTHrzzpADEZNk+yLejYIA6sMNP4YSYL+x8cxSIB8HqIPkg5QycaH # 6zY/2DDD/6b3+6LNb3Mj/qxWBZDwMiEWicZwiPkFl32jx0PdAug7Pe2xQaPtP77b # lUjE7h6z8rwMK5nQxl0SQoHhg26Ccz8mSxSQrllmCsSNvtLOBq6thG9IhJtPQLnx # TPKvmPv2zkBdXPao8S+v7Iki8msYZbHBc63X8djPHgp0XEK4aH...
aws_legacy_credentials_and_S3/pstoolsec2sghtml_9_0.txt
You need the public IP address of your computer, in CIDR notation. You can get the public IP address of your local computer using a service. For example, Amazon provides the following service: [ http://checkip.amazonaws.com/ ](http://checkip.amazonaws.com/) or [ https://checkip.amazonaws.com/ ](https://checkip.amazonaw...
aws_legacy_credentials_and_S3/howtosetupanawslambd_75_0.txt
### Testing the Function
aws_legacy_credentials_and_S3/powershelllambdacode_158_0.txt
** Tools for PowerShell **
aws_legacy_credentials_and_S3/powershelllambdacode_25_0.txt
**Example 1: This example retrieves the Routing Config weights for a specific Lambda Function Alias.**
aws_legacy_credentials_and_S3/powershelllambdacode_81_0.txt
**Output:**
aws_legacy_credentials_and_S3/powershelllambdacode_74_0.txt
**Output:**
aws_legacy_credentials_and_S3/powershelllambdacode_8_0.txt
###### Topics
aws_legacy_credentials_and_S3/pstoolsec2sghtml_7_0.txt
* Prerequisites * Creating a Security Group for EC2-Classic * Creating a Security Group for EC2-VPC
aws_legacy_credentials_and_S3/howtosetupanawslambd_80_0.txt
![image-84.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1610664795451/rUlxXvMKH.png?auto=compress,format&format=webp)
aws_legacy_credentials_and_S3/pstoolsec2sghtml_53_0.txt
Thanks for letting us know this page needs work. We're sorry we let you down.
aws_legacy_credentials_and_S3/powershelllambdacode_40_0.txt
Get-LMFunctionConfiguration -FunctionName "MylambdaFunction123" -Qualifier "PowershellAlias"
aws_legacy_credentials_and_S3/powershelllambdacode_79_0.txt
**Example 1: This example returns the list of version specific configurations for each version of the Lambda Function.**
aws_legacy_credentials_and_S3/howtosetupanawslambd_3_0.txt
# [ ATA ](/?source=top_nav_blog_home)
aws_legacy_credentials_and_S3/howtosetupanawslambd_12_0.txt
> _This article was written by Michael Soule. He is a frequent contributor to > the Adam the Automator (ATA) blog. If you'd like to read more from this > author, check out his[ ATA author page > ](http://adamtheautomator.com/author/michael) . Be sure to also check out [ > more how-to posts on cloud computing, system ad...
aws_legacy_credentials_and_S3/pstoolsec2sghtml_22_0.txt
$cidrBlocks = New-Object 'collections.generic.list[string]' $cidrBlocks.add("203.0.113.25/32") $ipPermissions = New-Object Amazon.EC2.Model.IpPermission $ipPermissions.IpProtocol = "tcp" $ipPermissions.FromPort = 22 $ipPermissions.ToPort = 22 ipPermissions.IpRanges = $cidrBlocks Grant-EC2SecurityGroupIngress -GroupName...
aws_legacy_credentials_and_S3/howtosetupanawslambd_49_0.txt
#### Creating the Lambda Working Directory
aws_legacy_credentials_and_S3/powershelllambdacode_60_0.txt
**Example 1: This example gets the provisioned Concurrency Configuration for the specified Alias of the Lambda Function.**
aws_legacy_credentials_and_S3/powershelllambdacode_41_0.txt
**Output:**
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_46_0.txt
[ Contact Us ](/policies/Contact)
aws_legacy_credentials_and_S3/powershelllambdacode_102_0.txt
* For API details, see [ PublishVersion ](https://docs.aws.amazon.com/powershell/latest/reference) in _AWS Tools for PowerShell Cmdlet Reference_ .
aws_legacy_credentials_and_S3/howtosetupanawslambd_62_0.txt
![image-87.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1610664768907/rvAN79xXF.png?auto=compress,format&format=webp)
aws_legacy_credentials_and_S3/powershelllambdacode_27_0.txt
**Output:**
aws_legacy_credentials_and_S3/howtosetupanawslambd_65_0.txt
The below code snippet:
aws_legacy_credentials_and_S3/aws_legacy_credentials_1_2.txt
to a file in the AWS shared credential file format | Search only the specified file for a profile with the given name. ### Save Credentials to a Credentials File To write and save credentials to one of the two credential files, run the ` Set-AWSCredential ` cmdlet. The following example shows how to do this. ...
aws_legacy_credentials_and_S3/pstoolsec2sghtml_6_0.txt
###### Topics
aws_legacy_credentials_and_S3/pstoolsec2sghtml_50_0.txt
Thanks for letting us know we're doing a good job!
aws_legacy_credentials_and_S3/howtosetupanawslambd_52_0.txt
![image-86.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1610664746965/p10frLUds.png?auto=compress,format&format=webp)
aws_legacy_credentials_and_S3/powershelllambdacode_84_0.txt
The following code example shows how to use ` New-LMAlias ` .
aws_legacy_credentials_and_S3/powershelllambdacode_5_0.txt
_Actions_ are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios and cross-service examples.
aws_legacy_credentials_and_S3/powershelllambdacode_161_0.txt
* For API details, see [ PutProvisionedConcurrencyConfig ](https://docs.aws.amazon.com/powershell/latest/reference) in _AWS Tools for PowerShell Cmdlet Reference_ .
aws_legacy_credentials_and_S3/aws_s3_4_0.txt
[ ](/pdfs/powershell/latest/userguide/aws-pst-ug.pdf#pstools-s3-upload-in- line-text "Open PDF") [ AWS ](https://aws.amazon.com) [ Documentation ](/index.html) [ AWS Tools for PowerShell ](/powershell/index.html) [ User Guide ](pstools-welcome.html) # Upload In-Line Text Content to Amazon S3 The ` Write-S3Object ` ...
aws_legacy_credentials_and_S3/howtosetupanawslambd_13_0.txt
If you'd like to leverage your PowerShell skills to your AWS Lambda functions, you're going to get a step-by-step tutorial in this article.
aws_legacy_credentials_and_S3/howtosetupanawslambd_69_0.txt
### Creating a Test Role
aws_legacy_credentials_and_S3/pstoolsec2sghtml_23_0.txt
To verify the security group was updated, run the ` Get-EC2SecurityGroup ` cmdlet again. Note that you can't specify an outbound rule for ` EC2-Classic ` .
aws_legacy_credentials_and_S3/howtosetupanawslambd_6_0.txt
![How to Set Up an AWS Lambda PowerShell Function](https://cdn.hashnode.com/res/hashnode/image/upload/v1610664932598/-v9S8zQea.jpeg?w=1600&h=840&fit=crop&crop=entropy&auto=compress,format&format=webp) ![How to Set Up an AWS Lambda PowerShell Function](https://cdn.hashnode.com/res/hashnode/image/upload/v1610664932598/-v...
aws_legacy_credentials_and_S3/powershelllambdacode_46_0.txt
**Example 1: This sample displays all the Lambda functions with sorted code size**
aws_legacy_credentials_and_S3/powershelllambdacode_130_0.txt
**Example 1: Removes the supplied tags from a function. The cmdlet will prompt for confirmation before proceeding unless the -Force switch is specified. A single call is made to the service to remove the tags.**
aws_legacy_credentials_and_S3/pstoolsec2sghtml_31_0.txt
PS > $groupid = New-EC2SecurityGroup ` -VpcId "vpc-da0013b3" ` -GroupName "myPSSecurityGroup" ` -GroupDescription "EC2-VPC from PowerShell"
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_14_0.txt
# internal function to perform the registration using either cmdlet or manipulation # of the options table function _awsArgumentCompleterRegistration ( ) { param ( [scriptblock] $scriptBlock , [hashtable] $param2CmdletsMap )
aws_legacy_credentials_and_S3/powershelllambdacode_76_0.txt
* For API details, see [ ListTags ](https://docs.aws.amazon.com/powershell/latest/reference) in _AWS Tools for PowerShell Cmdlet Reference_ .
aws_legacy_credentials_and_S3/howtosetupanawslambd_44_0.txt
In the below code snippet, the Amazon Resource Number (ARN) of the IAM Role and the S3 Bucket name are passed in from the variables used when creating the components in previous commands.
aws_legacy_credentials_and_S3/powershelllambdacode_110_0.txt
**Example 1: This example deletes a specific version of a Lambda function**
aws_legacy_credentials_and_S3/pstoolsec2sghtml_20_0.txt
Description : EC2-Classic from PowerShell GroupId : sg-0a346530123456789 GroupName : myPSSecurityGroup IpPermissions : {} IpPermissionsEgress : {Amazon.EC2.Model.IpPermission} OwnerId : 123456789012 Tags : {} VpcId : vpc-9668ddef
aws_legacy_credentials_and_S3/howtosetupanawslambd_14_0.txt
Throughout this article, you will learn how to get started building an AWS Lambda PowerShell function. You'll learn by going through an example use case that creates IAM roles. You will create a Lambda function that is capable of creating other IAM Roles. Your function will read your Role settings (template) from a fil...
aws_legacy_credentials_and_S3/powershelllambdacode_71_0.txt
** Tools for PowerShell **
aws_legacy_credentials_and_S3/howtosetupanawslambd_29_0.txt
The code below is creating a new S3 bucket and disables public access to the bucket explicitly.
aws_legacy_credentials_and_S3/howtosetupanawslambd_61_0.txt
If executed properly, you should then see output similar to the following:
aws_legacy_credentials_and_S3/pstoolsec2sghtml_34_0.txt
OwnerId : 123456789012 GroupName : myPSSecurityGroup GroupId : sg-5d293231 Description : EC2-VPC from PowerShell IpPermissions : {} IpPermissionsEgress : {Amazon.EC2.Model.IpPermission} VpcId : vpc-da0013b3 Tags : {}
aws_legacy_credentials_and_S3/howtosetupanawslambd_74_0.txt
$policy = @"{ "arn": [ "arn:aws:iam::aws:policy/AdministratorAccess" ]}"@## $((Get-STSCallerIdentity).Account) returns the current AWS account number## Replace ROLE-Name with any name you'd like the role to beWrite-S3Object -BucketName $bucket.BucketName -Key "$((Get-STSCallerIdentity).Account)/ROLE-Name/m...
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_45_0.txt
---
aws_legacy_credentials_and_S3/powershelllambdacode_122_0.txt
* For API details, see [ RemovePermission ](https://docs.aws.amazon.com/powershell/latest/reference) in _AWS Tools for PowerShell Cmdlet Reference_ .
aws_legacy_credentials_and_S3/powershelllambdacode_138_0.txt
Update-LMAlias -FunctionName "MylambdaFunction123" -Description " Alias for version 2" -FunctionVersion 2 -Name "newlabel1" -RoutingConfig_AdditionalVersionWeight @{Name="1";Value="0.6}
aws_legacy_credentials_and_S3/howtosetupanawslambd_25_0.txt
In the following sections you will learn how to provision IAM roles through an example Lambda PowerShell function.
aws_legacy_credentials_and_S3/pstoolsec2sghtml_1_0.txt
[ AWS ](https://aws.amazon.com) [ Documentation ](/index.html) [ AWS Tools for PowerShell ](/powershell/index.html) [ User Guide ](pstools-welcome.html)
aws_legacy_credentials_and_S3/powershelllambdacode_95_0.txt
**Example 2: This example is similar to the previous one except the function binaries are first uploaded to an Amazon S3 bucket (which must be in the same region as the intended Lambda function) and the resulting S3 object is then referenced when creating the function.**
aws_legacy_credentials_and_S3/powershelllambdacode_82_0.txt
FunctionName Runtime MemorySize Timeout CodeSize LastModified RoleName ------------ ------- ---------- ------- -------- ------------ -------- MylambdaFunction123 python3.8 128 600 659 2020-01-10T03:20:56.390+0000 lambda MylambdaFunction123 python3.8 ...
aws_legacy_credentials_and_S3/powershelllambdacode_97_0.txt
* For API details, see [ CreateFunction ](https://docs.aws.amazon.com/powershell/latest/reference) in _AWS Tools for PowerShell Cmdlet Reference_ .
aws_legacy_credentials_and_S3/pstoolsec2sghtml_47_0.txt
Create a Key Pair
aws_legacy_credentials_and_S3/pstoolsec2sghtml_25_0.txt
OwnerId : 123456789012 GroupName : myPSSecurityGroup GroupId : sg-0a346530123456789 Description : EC2-Classic from PowerShell IpPermissions : {Amazon.EC2.Model.IpPermission} IpPermissionsEgress : {} VpcId : Tags : {}
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_50_0.txt
[ Feedback ](https://github.com/PowerShell/PowerShellGallery/issues)
aws_legacy_credentials_and_S3/howtosetupanawslambd_43_0.txt
Now that you have a custom IAM role created, it's time to update the S3 bucket policy to allow access to it. To do that, create and assign a policy that allows your role to perform any action against the bucket and objects within the bucket. You'll see below how to do that.
aws_legacy_credentials_and_S3/howtosetupanawslambd_78_0.txt
The below code is manually invoking the function which should then create the IAM role. To check for the new IAM role, ` Get-IAMRole ` is checking for the existence of a role called _ROLE-Name_ .
aws_legacy_credentials_and_S3/powershelllambdacode_6_0.txt
_Scenarios_ are code examples that show you how to accomplish a specific task by calling multiple functions within the same service.
aws_legacy_credentials_and_S3/powershelllambdacode_111_0.txt
Remove-LMFunction -FunctionName "MylambdaFunction123" -Qualifier '3'
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_34_0.txt
$cmdletType = Invoke-Expression "[Amazon.PowerShell.Cmdlets.LM.$($commandName.Replace('-', ''))Cmdlet]" if ( -not $cmdletType ) { return } $awsCmdletAttribute = $cmdletType . GetCustomAttributes ( [Amazon.PowerShell.Common.AWSCmdletAttribute] , $false ) if ( -not $awsCmdletAttribute ) { return } $ty...
aws_legacy_credentials_and_S3/powershelllambdacode_91_0.txt
**Example 1: This example creates a new C# (dotnetcore1.0 runtime) function named MyFunction in AWS Lambda, providing the compiled binaries for the function from a zip file on the local file system (relative or absolute paths may be used). C# Lambda functions specify the handler for the function using the designation A...
aws_legacy_credentials_and_S3/howtosetupanawslambd_0_0.txt
[ ](/)
aws_legacy_credentials_and_S3/powershelllambdacode_153_0.txt
** Tools for PowerShell **
aws_legacy_credentials_and_S3/pstoolsec2sghtml_19_0.txt
PS > Get-EC2SecurityGroup -GroupNames myPSSecurityGroup
aws_legacy_credentials_and_S3/howtosetupanawslambd_36_0.txt
To create an IAM role for your Lambda function, execute the code you see below. This code defines a JSON object allowing the AWS Lambda service to assume the role and uses that JSON to create a role named ` ROLE-RoleManager ` .
aws_legacy_credentials_and_S3/powershelllambdacode_33_0.txt
Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *
aws_legacy_credentials_and_S3/pstoolsec2sghtml_49_0.txt
Did this page help you? - Yes
aws_legacy_credentials_and_S3/howtosetupanawslambd_2_0.txt
Follow
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_38_0.txt
$v | Where-Object { $_ -match "^$([System.Text.RegularExpressions.Regex]::Escape($wordToComplete)).*" } | ForEach-Object { New-Object System.Management.Automation.CompletionResult $_ , $_ , 'ParameterValue' , $_ } }
aws_legacy_credentials_and_S3/powershelllambdacode_119_0.txt
** Tools for PowerShell **
aws_legacy_credentials_and_S3/howtosetupanawslambd_67_0.txt
$lambda = Get-LMFunctionList|Where-Object{$_.Role -eq $role.Arn} $rule = Write-CWERule -Name "RULE-CronHourly" -ScheduleExpression "rate(1 hour)" -State ENABLED $target = New-Object Amazon.CloudWatchEvents.Model.Target $target.Arn = $lambda.FunctionArn $target.Id = $lambda.RevisionId Write-CWETarget -Rule $rule.Substri...
aws_legacy_credentials_and_S3/pstoolsec2sghtml_24_0.txt
PS > Get-EC2SecurityGroup -GroupNames myPSSecurityGroup
aws_legacy_credentials_and_S3/pstoolsec2sghtml_26_0.txt
To view the security group rule, use the ` IpPermissions ` property.
aws_legacy_credentials_and_S3/pstoolsec2sghtml_10_0.txt
###### Warning
aws_legacy_credentials_and_S3/powershelllambdacode_115_0.txt
**Example 1: This examples removes the Function Concurrency of the Lambda Function.**
aws_legacy_credentials_and_S3/powershelllambdacode_55_0.txt
**Output:**
aws_legacy_credentials_and_S3/howtosetupanawslambd_38_0.txt
Now that you have created the IAM Role, now assign specific permissions to the role. You can assign permissions through [ inline or AWS managed policies ](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs- inline.html) . You will use one of each below.
aws_legacy_credentials_and_S3/pstoolsec2sghtml_42_0.txt
IpProtocol : tcp FromPort : 22 ToPort : 22 UserIdGroupPairs : {} IpRanges : {203.0.113.25/32}
aws_legacy_credentials_and_S3/pstoolsec2sghtml_30_0.txt
The following ` New-EC2SecurityGroup ` example adds the ` -VpcId ` parameter to create a security group for the specified VPC.
aws_legacy_credentials_and_S3/powershelllambdacode_89_0.txt
The following code example shows how to use ` Publish-LMFunction ` .
aws_legacy_credentials_and_S3/powershelllambdacode_101_0.txt
Publish-LMVersion -FunctionName "MylambdaFunction123" -Description "Publishing Existing Snapshot of function code as a new version through Powershell"
aws_legacy_credentials_and_S3/powershelllambdacode_72_0.txt
**Example 1: Retrieves the tags and their values currently set on the specified function.**
aws_legacy_credentials_and_S3/powershelllambdacode_20_0.txt
**Output:**
aws_legacy_credentials_and_S3/powershelllambdacode_154_0.txt
**Example 1: This example applies the concurrency settings for the Function as a whole.**
aws_legacy_credentials_and_S3/howtosetupanawslambd_23_0.txt
Within the AWS ecosystem, the Identity and Access Management (IAM) service controls authentication and access. One of these main components is [ IAM roles ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) . IAM roles allow you to define what action can be taken or prevented against a specific AWS resour...
aws_legacy_credentials_and_S3/howtosetupanawslambd_35_0.txt
> _In the following commands, you will see variables set to multiple line > strings representing JavaScript Object Notation (JSON) values. AWS IAM uses > JSON heavily to define permissions and policies. You can read more about IAM > in the[ AWS IAM User Guide > ](https://docs.aws.amazon.com/IAM/latest/UserGuide/referen...
aws_legacy_credentials_and_S3/AWSToolsLambdaComple_10_0.txt
### AWS.Tools.Lambda.Completers.psm1
aws_legacy_credentials_and_S3/powershelllambdacode_88_0.txt
* For API details, see [ CreateAlias ](https://docs.aws.amazon.com/powershell/latest/reference) in _AWS Tools for PowerShell Cmdlet Reference_ .
aws_legacy_credentials_and_S3/powershelllambdacode_157_0.txt
The following code example shows how to use ` Write- LMProvisionedConcurrencyConfig ` .
aws_legacy_credentials_and_S3/aws_s3_0_0.txt
[ ](/pdfs/powershell/latest/userguide/aws-pst-ug.pdf#pstools-s3-bucket-create "Open PDF") [ AWS ](https://aws.amazon.com) [ Documentation ](/index.html) [ AWS Tools for PowerShell ](/powershell/index.html) [ User Guide ](pstools-welcome.html) See Also # Create an Amazon S3 Bucket, Verify Its Region, and Optionally ...
aws_legacy_credentials_and_S3/howtosetupanawslambd_71_0.txt
The function trigger will occur every hour, but the Lambda will not take any action until the JSON IAM objects are in the S3 bucket. Go ahead and create one using the ` Write-S3Object ` PowerShell cmdlet using the code below.
aws_legacy_credentials_and_S3/powershelllambdacode_96_0.txt
Write-S3Object -BucketName mybucket -Key MyFunctionBinaries.zip -File .\MyFunctionBinaries.zip Publish-LMFunction -Description "My C# Lambda Function" ` -FunctionName MyFunction ` -BucketName mybucket ` -Key MyFunctionBinaries.zip ` -Handler "AssemblyName::Namespace.ClassName::MethodName" ` -Role "arn:aws:iam::12345678...