Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift / iOS 16.4 / simulator and device / AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE #5013

Closed
jeff-orthober opened this issue Oct 26, 2023 · 1 comment
Labels
closing soon pending-community-response Issue is pending response from the issue requestor question General question s3 Issues related to S3 storage

Comments

@jeff-orthober
Copy link

State your question

What is the proper way to define the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY_ID for iOS Swift?

I have put it in environments and plist with no luck. Confirmed that it is working with aws command line config / list buckets
can not find docs on how exactly to do this for iOS Swift.
Call to
client = try S3Client(region: "us-east-2")
has error
Error info: crtError(AwsCommonRuntimeKit.CRTError(code: 6153, message: "Valid credentials could not be sourced by the IMDS provider", name: "AWS_AUTH_CREDENTIALS_PROVIDER_IMDS_SOURCE_FAILURE"))

Which AWS Services are you utilizing?

AWS SDK for iOS SWIFT

Provide code snippets (if applicable)

Environment(please complete the following information):

  • SDK Version: Latest Swift SDK Package
  • Dependency Manager: Swift Package Downloaded and referenced
  • Swift Version : XCODE 14.3.1

Device Information (please complete the following information):

  • Device: iPad and Simulator
  • iOS Version: iOS 16.4
  • Specific to simulators:

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.

@phantumcode
Copy link
Contributor

@jeff-orthober Thanks for submitting your question. Please see the documentation here and verify that your credential is configured as documented: https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/using-configuration.html

Can you clarify your use case? If you are trying to use the AWS iOS SDK or the AWS SDK for Swift? ?

If you're using the AWS iOS SDK directly, have you looked at the sample app for access S3 here? https://github.com/awslabs/aws-sdk-ios-samples/tree/main/S3TransferUtility-Sample/Swift

If you're using the AWS SDK for Swift directly, have you looked at the samples here?

You can also consider using the Amplify Swift library and use the Storage category to access S3. See the documentation here: https://docs.amplify.aws/lib/storage/getting-started/q/platform/ios/

@phantumcode phantumcode added question General question s3 Issues related to S3 storage pending-community-response Issue is pending response from the issue requestor labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing soon pending-community-response Issue is pending response from the issue requestor question General question s3 Issues related to S3 storage
Projects
None yet
Development

No branches or pull requests

3 participants