Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gabor Ferencz 40 posts 181 karma points
    Feb 14, 2024 @ 17:57
    Gabor Ferencz
    0

    Umbraco 12 AWS S3 File System provider

    Just upgrading a project running in AWS and we've run into an issue where this package doesn't play well with image processor. Is there a fix to this?

    https://our.umbraco.com/packages/collaboration/aws-s3-media-file-system-provider/

    As soon as I try to use Image processor, or when I'm listing the images in Umbraco, I get the following error:

    AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service.
    Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials()
    

    Has anyone had this? When viewing the image in the image view mode, it works. I have created a profile with AWS toolkit, and since then the individual view with focal point editor started working. Any help would be massively appreciated...

  • Mark 2 posts 72 karma points
    May 22, 2024 @ 09:30
    Mark
    0

    Hey Gabor,

    Did you find a solution to this? I'm experiencing the same issue on a U13 project.

    Thanks!

  • Marshall Penn 86 posts 271 karma points
    May 22, 2024 @ 13:21
    Marshall Penn
    0

    Did you see my earlier reply?

  • Mark 2 posts 72 karma points
    May 22, 2024 @ 15:10
    Mark
    0

    Just had a notification. Thank you! I'll take a look and see if it resolves the issues I'm having.

  • Marshall Penn 86 posts 271 karma points
    May 22, 2024 @ 10:32
    Marshall Penn
    1

    We have multiple Umbraco 10 instances running on fargate (Linux) using AWS S3 with this Nuget package:

    https://www.nuget.org/packages/Our.Umbraco.StorageProviders.AWSS3/1.3.0

    Getting it to work required a few tweaks.

    These Nuget Packages: (although ours are not these exact versions)

    https://www.nuget.org/packages/AWSSDK.Extensions.NETCore.Setup/3.7.3

    https://www.nuget.org/packages/AWSSDK.S3/3.7.9.53

    https://www.nuget.org/packages/Our.Umbraco.StorageProviders.AWSS3/1.3.0

    This appsetting section:

    "AWS": {
      "AccessKey": "BLAH BLAH BLAH 1",
      "AccessSecret": "BLAH BLAH BLAH 2",
      "AWSProfileName": "awsprofile1",
      "BucketName": "folder1/subfolder",
      "EndPoint": "s3.eu-south-9.amazonaws.com",
      "MediaDomain": "blahblah.cloudfront.net",
      "MediaPrefix": "media",
      "Profile": "awsprofile1",
      "ProfilesLocation": "./aws.config",
      "Region": "eu-south-9",
    },
    

    This appsetting:

    "Umbraco": {
      "CMS": {
        "Storage": {
          "AWSS3": {
            "Media": {
              "BucketName": "folder1/subfolder"
            }
          }
        }
      }
    }
    

    a seperate file that contains the AWS creds - even though they are there in the appsettings: - we called ours aws.config, but its just a text file:

    [awsprofile1]
    aws_access_key_id=BLAH BLAH BLAH 1
    aws_secret_access_key=BLAH BLAH BLAH 2
    aws_default_region=eu-south-9
    region=eu-south-9
    

    You can see its referenced in the AWS appsettings section. We have multiple named profiles in ours for the different environments

    Startup/program.cs

    var awsOption = _config.GetAWSOptions();
    
    services.AddDefaultAWSOptions(awsOption);
    

    Our system is a headless one, and the front end access goes via cloudfront, so although the Images show up in the CMS, we have no front end views in the Umbraco project. I would assume they do work in the front end views - as they show in the back office. Our FE project is Next JS.

    This has been in multiple production setups for 18+ months now

  • Gabor Ferencz 40 posts 181 karma points
    May 22, 2024 @ 10:42
    Gabor Ferencz
    0

    Hi Mark,

    Unfortunately not - we have instead gone with mapped drives on the containers, so we have a persisted file storage. This seems to work perfectly. Or use Azure Blob storage, that also works perfectly.

  • Richard Ockerby 39 posts 214 karma points MVP 4x c-trib
    Feb 13, 2025 @ 13:21
    Richard Ockerby
    0

    I had this exact error on a project I was working on recently. We have the AWS credentials configured in the appsettings file, the "problem" was the IAM policy on the bucket (it required a specific role).

    We just needed to assign the role to the EC2 and connections went through as expected.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies