Skip to content

Commit

Permalink
refactor: update deprecated AWS Lambda function calls
Browse files Browse the repository at this point in the history
- Replace deprecated `WaitUntilFunctionUpdatedWithContext` with `WaitUntilFunctionUpdatedV2WithContext`
- Replace deprecated `GetFunctionConfigurationInput` with `GetFunctionInput`

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Apr 2, 2023
1 parent c8428c2 commit 53b642c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ func (p Plugin) Exec() error {
svc := lambda.New(sess, config)

if isUpdateConfig {
if err := svc.WaitUntilFunctionUpdatedWithContext(
if err := svc.WaitUntilFunctionUpdatedV2WithContext(
aws.BackgroundContext(),
&lambda.GetFunctionConfigurationInput{
&lambda.GetFunctionInput{
FunctionName: aws.String(p.Config.FunctionName),
},
request.WithWaiterMaxAttempts(p.Config.MaxAttempts),
Expand Down

0 comments on commit 53b642c

Please sign in to comment.