aws-amplify / aws-sdk-ios

AWS SDK for iOS. For more information, see our web site:
https://aws-amplify.github.io/docs
Other
1.68k stars 885 forks source link

How to call Amazon Lex v2 bot #5146

Closed tingyao-chang closed 9 months ago

tingyao-chang commented 11 months ago

State your question Need to use Amazon Lex v2 for production, but now the iOS SDK does not have Lex v2, it seems that I need to call the Lex v2 API, are there any guides or examples that can let me sign API requests using the iOS SDK?

Which AWS Services are you utilizing? Amazon Lex v2

Provide code snippets (if applicable)

Environment(please complete the following information):

Device Information (please complete the following information):

If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application, as well as the associated backend setup by using the Amplify CLI.

thisisabhash commented 11 months ago

Thank you for the feature request - our team will discuss it internally and post further updates on this ticket.

tingyao-chang commented 11 months ago

Hi @thisisabhash, thanks for your reply. Since the application go-live timeline is tight, is there any documentation I can refer to regarding signing Amazon Lex v2 API requests, for example using AWSCore/Authentication/AWSSignature? I would appreciate any pointers. Thanks!

lawmicha commented 11 months ago

Hi @tingyao-chang, I know of a AWSSignatureV4Signer usage from here (Amplify V1).

/// ... 
endpoint = AWSEndpoint(region: region,
                                   serviceName: URLRequestConstants.appSyncServiceName,
                                   url: mutableRequest.url)
let signer: AWSSignatureV4Signer = AWSSignatureV4Signer(
            credentialsProvider: iamCredentialsProvider.getCredentialsProvider(),
            endpoint: endpoint)
lawmicha commented 11 months ago

Related https://github.com/aws-amplify/amplify-swift/issues/3433